Traditional Language Models (LMs) excel at capturing local syntax and short-term dependencies—predicting what word comes next in a sentence. However, they often struggle to maintain a grasp on global document context. While researchers have attempted to "marry" LMs with Topic Models (TMs) to provide this missing document-level context, two major hurdles remain:
- Abstract Latency: Most models rely on latent vectors to represent topics. These act as "black boxes" that provide numerical context but lack human-interpretable semantic anchors.
- Topical Mismatch: A document's overarching theme doesn't always match the local discourse of a specific sentence. For example, a document about "Marketing" might contain a sentence about "Computer Chips." If the LM only references the global "Marketing" theme, it will struggle to predict technical electronics terms in that specific sentence.
To address these issues, this paper introduces the Neural Composite Language Model (NCLM), a framework that bridges the gap between local word sequences and global document themes by incorporating "explainable" topic representations and accounting for sentence-level topical shifts.
The NCLM Framework
The NCLM consists of two main components trained jointly: a Neural Topic Model (NTM) and a Neural Language Model (NLM). It introduces two novel mechanisms to solve the latency and mismatch problems:
- Explainable Attentive Topic Representation (ETR): Instead of relying solely on an abstract latent vector, the model extracts the top-$N$ key terms for each topic (e.g., "processor, circuit, silicon"). It then creates an embedding for these terms, providing a fine-grained, human-readable semantic outlook that complements the abstract latent representation.
- Sentence-level Topical Discourse (SDT): To solve the topical mismatch problem, the model calculates topic proportions for the specific sentence being processed, rather than just the document as a whole. To prevent the model from "cheating" by seeing the word it is supposed to predict, the authors employ a leave-one-out approach, removing the target word from the sentence before calculating the topic.
The system uses a composite loss function that balances the NTM's ability to reconstruct the document and the NLM's ability to predict the next word, allowing both models to mutually enhance one another during training.
Key Insights and Results
The researchers evaluated the NCLM across several diverse NLP tasks, including language modeling (APNEWS, IMDB, BNC), text classification (20Newsgroups, Reuters), information retrieval, and Word Sense Disambiguation (WSD).
- Explainability as a Feature: Interpretability isn't just for human benefit; it actively helps the model. By forcing the LM to look at specific key terms (ETR) rather than just abstract vectors, it gains a clearer "semantic map" of the context.
- Complementary Strengths: Latent representations capture broad, fuzzy associations, while explainable representations capture precise, keyword-based context. Using both together (the LETA-NLM configuration) consistently yielded the best results.
- Significant Performance Gains: The NCLM significantly outperformed standard LSTM-LMs, showing a perplexity reduction of up to 33.8% on the APNEWS dataset.
- Superior Classification and Disambiguation: In text classification, models using explainable topics outperformed baseline CNNs. Furthermore, the model proved highly effective at resolving ambiguous words (like "chip") by using the explainable topical context to "nudge" the LM toward the correct domain (e.g., electronics vs. food).
- Topic Coherence: The topics generated by this framework were found to be significantly more coherent and human-readable than those from standard LDA or other neural topic models.
Limitations and Future Directions
While powerful, the framework does have limitations. Calculating sentence-level topics for every word prediction increases the computational overhead by a factor of the sentence length, making the SDT versions of the model slower to train and deploy. Additionally, the ETR component relies on high-quality pre-trained word embeddings (like Word2Vec), meaning performance might degrade in highly specialized domains where these embeddings are less accurate.
Looking ahead, the authors suggest this framework could be extended to more complex tasks like text generation and abstractive summarization, where maintaining topical consistency over long passages remains notoriously difficult.
Summary updated