Skip to main content
QUICK REVIEW

[Paper Review] Lightweight Adaptive Mixture of Neural and N-gram Language Models

Anton Bakhtin, Arthur Szlam|arXiv (Cornell University)|Apr 20, 2018
Natural Language Processing TechniquesComputer Science20 references9 citations
TL;DR

This paper proposes a lightweight adaptive mixture model that dynamically combines a pre-trained neural language model and an n-gram language model using a small gating network. The gating network predicts mixture weights based on handcrafted features (e.g., word frequency), enabling per-context optimization without retraining the experts, and achieves state-of-the-art perplexity on the One Billion Word and WSJ benchmarks with minimal computational overhead.

ABSTRACT

It is often the case that the best performing language model is an ensemble of a neural language model with n-grams. In this work, we propose a method to improve how these two models are combined. By using a small network which predicts the mixture weight between the two models, we adapt their relative importance at each time step. Because the gating network is small, it trains quickly on small amounts of held out data, and does not add overhead at scoring time. Our experiments carried out on the One Billion Word benchmark show a significant improvement over the state of the art ensemble without retraining of the basic modules.

Motivation & Objective

  • To improve the performance of language modeling by adaptively combining neural and n-gram language models beyond static ensembling.
  • To address the limitation of fixed scalar interpolation weights, which fail to capture context-dependent model strengths.
  • To design a gating mechanism that is fast to train and efficient at inference, using only a small number of handcrafted features.
  • To maintain the pre-trained status of both neural and n-gram models, avoiding costly retraining.
  • To achieve significant perplexity gains on large-scale benchmarks using minimal additional computation.

Proposed method

  • A small gating network is trained to predict the optimal mixture weight between a neural language model and an n-gram language model at each time step.
  • The gating network takes as input handcrafted features derived from word frequency and n-gram statistics, such as word frequency and n-gram count.
  • The mixture output is computed as a weighted average of the log-probabilities from the two models, with the weight determined by the gating network.
  • The gating network is trained on held-out validation data using stochastic optimization (Adam), with no gradient flow through the expert models.
  • Three architectures are evaluated: linear (LIN), multi-layer perceptron (MLP), and LSTM, with the LSTM showing the best performance.
  • Feature normalization is applied to the input features using mean and variance computed on the training set.

Experimental results

Research questions

  • RQ1Can a dynamic, context-dependent mixture of neural and n-gram language models outperform static ensembling with fixed interpolation weights?
  • RQ2Does a small, lightweight gating network trained on handcrafted features achieve better performance than fixed-weight ensembles without retraining the experts?
  • RQ3Is the performance gain due to the adaptive weighting mechanism or simply due to model capacity of the gating network?
  • RQ4How do different gating network architectures (linear, MLP, LSTM) compare in terms of performance and generalization?
  • RQ5Can the gating network effectively leverage frequency-based features to improve model selection at inference time?

Key findings

  • The adaptive mixture with the full feature set (FULL) achieved a test perplexity of 28.70 ± 0.04 on the One Billion Word benchmark, significantly outperforming the static ensemble baseline of 29.80.
  • On the WSJ dataset, the best model achieved a perplexity of 66.75 ± 0.03, a statistically significant improvement over the static ensemble (67.44).
  • The LSTM-based gating network outperformed both the MLP and linear models, indicating that modeling temporal dependencies in the gating decision improves performance.
  • The SIMPLE feature set alone outperformed the HIDDEN features (from the neural model’s last hidden layer) on the 1B Word dataset, suggesting that frequency-based features are more effective than hidden-state features for this task.
  • The gating network, with only 2572 parameters, trained quickly on a few thousand held-out sentences and added negligible inference cost.
  • The method achieved state-of-the-art results without retraining the neural or n-gram models, demonstrating the effectiveness of lightweight, adaptive fusion.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.