Abstract
Large-scale neural language models (LMs) are often monolithic, making it difficult to integrate specialized knowledge or personal data without expensive retraining. We present a "Neural Composition" framework that allows a general LM to seamlessly integrate separately trained component models. Using reinforcement learning and a lookahead teacher, the system learns to activate and attend to specialized components (e.g., personal contact lists) based on context. Evaluation on Wikipedia and ASR rescoring tasks demonstrates significant improvements in perplexity and word error rate (WER) for targeted entities without regressing on general language tasks.
Introduction
Large-scale neural language models are incredibly powerful but lack flexibility. Updating a model to include new entities or adapting it to a specific user’s contact list typically requires impractical retraining of the entire parameter set. Traditional "class-based" models attempt to solve this by swapping generic tokens for specific entries, but they rely on expensive, manually annotated data. Other methods, such as biasing, often fail to scale to thousands of entities. This paper introduces a framework for building a system that can "plug and play" specialized components into a general model using only unlabeled text data.
Methods
The proposed Compositional Language Model consists of four primary modules:
- The Default Model: A standard LSTM handling general language patterns.
- Specialized Components: These can be neural models or traditional Weighted Finite-State Transducers (WFSTs) representing specific entity types (e.g., city names or contact lists).
- The Activation Policy: A neural module that decides when a specialized component should be triggered based on preceding context.
- The Attention Mechanism: Once active, this module determines the relative weight given to the component’s prediction versus the default model’s prediction for each token.
To train the activation policy without manual labels, the authors utilize Reinforcement Learning (REINFORCE) combined with a Lookahead Teacher. During training, the teacher examines the ground-truth next word; if a specialized component predicts that word more accurately than the default model, the activation policy is rewarded for having triggered that component.
Results and Discussion
The researchers evaluated the model on English Wikipedia and ASR rescoring tasks. On Wikipedia, the compositional model achieved a 1.4% reduction in perplexity, with gains concentrated on sentences containing specific entities. In ASR tasks involving voice assistant interactions, the use of personalized entity components reduced the Word Error Rate (WER) by 10% relative to the baseline for utterances containing contact names.
Crucially, the system demonstrated "zero regression" on general sentences. The attention mechanism successfully ignores specialized components when they are not relevant, ensuring that the model maintains its general-purpose performance while gaining specialized accuracy.
Conclusion
The Neural Composition framework provides a scalable, model-agnostic way to personalize and specialize large LMs. By learning contextual cues from unlabeled data, the system discovers the implicit semantics of its components. Future work will focus on integrating this framework directly into real-time decoders to improve speed and integration in production environments.
Summary updated