Using Random Forests in the Structured Language Model

Peng Xu, Frederick JelinekNeurIPS 2004

This paper, authored by Peng Xu and Frederick Jelinek from Johns Hopkins University, explores a powerful intersection of machine learning and linguistics: using Random Forests (RFs) to enhance Structured Language Models (SLMs).

TL;DR

The researchers integrated Random Forests into Structured Language Models to overcome the "data sparseness" problem that occurs when using complex syntactic information for word prediction. By averaging the predictions of multiple randomized decision trees, they achieved a 10.9% improvement in perplexity and a 0.9% absolute reduction in Word Error Rate (WER) for speech recognition compared to state-of-the-art smoothing techniques.

What Problem Does This Paper Address?

In Natural Language Processing (NLP) and Speech Recognition, a language model's job is to predict the next word in a sequence. Standard $n$-gram models do this by looking at the previous $n-1$ words. However, Structured Language Models (SLMs) go further—they use the syntactic structure (like parse trees) of the sentence to make better predictions.

The catch? Syntactic information is incredibly "sparse." Because there are so many possible ways to parse a sentence, the model often encounters "histories" (contexts) it has never seen in its training data. Traditional methods like Kneser-Ney (KN) smoothing help, but they have limits. Previous attempts to use single Decision Trees (DTs) to cluster these histories failed to outperform simple $n$-grams. This paper asks: Can the ensemble power of Random Forests succeed where single trees failed?

Methods

The authors adapt the classic Random Forest algorithm—originally designed for classification—to the task of language modeling.

  1. Randomized Tree Growth: Unlike standard decision trees that look for the "best" split at every node, these trees are grown with two layers of randomness:
  2. A random subset of "positions" in the history (e.g., the previous word, the headword of the previous phrase) is chosen for each split.
  3. The initial grouping of histories into "left" and "right" branches is randomized before being optimized.
  4. The SLM Triple Approach: An SLM consists of three components: a Word-Predictor, a Tagger, and a Constructor. To make the model computationally feasible, the authors grew 100 DTs for each component and grouped them into 100 "triples."
  5. Ensemble Averaging: Instead of relying on one parse, the model runs the SLM search process for each triple and averages the resulting word probabilities. This "collective contribution" allows the strengths of some trees to compensate for the weaknesses (or missing data) of others.

Datasets

  • UPenn Treebank (Wall Street Journal corpus): Used for the primary training and perplexity (PPL) evaluation. It contains approximately 1 million words of hand-parsed text.
  • WSJ DARPA’93 HUB1: Used to evaluate Word Error Rate (WER) in a real-world speech recognition setup.
  • Large-Scale Training: For the ASR experiments, the authors used 20 million words of automatically parsed text to train the SLM components.

Key Insights and Ideas

  • Generalization over Memorization: Single decision trees tend to overfit sparse linguistic data. RFs, by averaging many trees, act as a "randomized history clustering" mechanism that generalizes much better to unseen syntactic structures.
  • The Power of Diversity: The "aha moment" is that different trees in the forest develop different "weaknesses." Because the trees are grown randomly, they don't all fail on the same rare syntactic patterns.
  • Syntactic Synergy: Interestingly, the authors found that RFs provide a bigger performance boost when using syntactic information than they do when applied to simple word $n$-grams. This suggests that the more complex the feature space, the more useful the Random Forest ensemble becomes.

Key Results

The authors compared their RF-SLM against a baseline SLM using Kneser-Ney (KN) smoothing:

  • Perplexity (PPL): The RF-SLM achieved a PPL of 122.8, compared to the baseline's 137.9—a 10.9% improvement.
Perplexity comparison between KN-SLM and RF-SLM
  • Word Error Rate (WER): In N-best re-scoring for speech recognition, the RF approach reduced the WER from 12.8% to 11.9%. An absolute reduction of 0.9% is considered significant in the context of large-vocabulary speech recognition.
  • Convergence: The study showed that performance gains start to level off after about 40–60 trees, confirming that the ensemble approach is stable.
Perplexity vs. Number of Decision Trees

Limitations and Future Work

  • Computational Complexity: The primary drawback is the cost of inference. Running a complex multi-stack search algorithm 100 times (once for each DT triple) is computationally expensive and potentially too slow for real-time applications without heavy optimization.
  • Memory Footprint: Loading 100 sets of decision trees into memory is "impractical" for very large models. The authors had to use a grouping strategy to mitigate this, but scaling to even larger vocabularies remains a challenge.
  • Future Directions: The authors suggest that further refinements in how trees are randomized or pruned could lead to even leaner, faster forests without sacrificing the accuracy gains.

Summary updated

BibTeX
@inproceedings{xu2004using,
  author = {Peng Xu and Frederick Jelinek},
  title = {{Using Random Forests in the Structured Language Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2004},
}
Figure