Abstract
Although fully generative models have been successfully used to model the contents of text documents, they are often awkward to apply to combinations of text data and document metadata. In this paper we propose a Dirichlet-multinomial regression (DMR) topic model that includes a log-linear prior on document-topic distributions that is a function of observed features of the document, such as author, publication venue, references, and dates. We show that by selecting appropriate features, DMR topic models can meet or exceed the performance of several previously published topic models designed for specific data.
Introduction
Latent Dirichlet Allocation (LDA) has become a standard tool for uncovering thematic structures in large document collections. However, documents are rarely isolated text; they are accompanied by rich metadata such as authors, publication dates, and venues. Incorporating this "side information" into topic models is crucial for better predictive performance and more nuanced analysis.
Traditional approaches have relied on building specialized generative models for each type of metadata, such as the Author-Topic (AT) model or the Topics over Time (TOT) model. These models treat metadata as observed variables that must be generated by the model. This approach is often mathematically cumbersome, computationally expensive, and difficult to extend when multiple, heterogeneous metadata features are present simultaneously.
The Dirichlet-multinomial Regression Model
We propose the Dirichlet-multinomial Regression (DMR) model as a flexible, conditional alternative to specialized generative models. Instead of attempting to generate document metadata, DMR conditions on these features to influence the document-topic distribution.
Model Architecture
In standard LDA, all documents share a global Dirichlet prior $\alpha$. In DMR, we define a document-specific prior $\alpha_{dt}$ for each topic $t$ in document $d$. This prior is modeled as a log-linear function of the document's observed features $x_d$: $$\alpha_{dt} = \exp(x_d^T \lambda_t)$$ where $x_d$ is a vector of features (e.g., binary indicators for authors or venues) and $\lambda_t$ is a vector of parameters learned for each topic.
Advantages of Conditioning
By treating metadata as conditional features rather than generated outputs, DMR avoids the need to model the complex distributions of the metadata itself. This "feature engineering" approach allows researchers to easily incorporate diverse information—such as multiple authors, publication years, and citations—into a single unified framework without redesigning the model's core architecture. Furthermore, the inference process remains efficient, utilizing a stochastic EM scheme that combines standard Gibbs sampling for topic assignments with numerical optimization (e.g., L-BFGS) for the feature weights $\lambda$.
Experimental Evaluation
We evaluated the DMR model using a subset of the Rexa database, comprising research papers from AI-related venues published from 1987 onwards. Features included disambiguated author IDs, publication venues, normalized dates, and citations.
Comparison with Specialized Models
DMR was compared against several state-of-the-art specialized models:
- Author-Topic (AT) Model: While the AT model is specifically designed for author metadata, DMR demonstrated significantly better perplexity on held-out text. DMR's ability to create a "fresh" prior for each document allows it to adapt more effectively to document-specific vocabulary.
- Topics over Time (TOT): By using temporal information as features, DMR outperformed the specialized TOT model in both perplexity and likelihood.
Retrieval Performance
Beyond text prediction, DMR excels at metadata-related tasks. For instance, in author retrieval—predicting the most likely author for a given document—DMR significantly outperformed the AT model, as shown in the recall curves below.
Conclusion
The Dirichlet-multinomial Regression model provides a powerful and flexible framework for incorporating document metadata into topic models. By shifting from a generative to a conditional approach, DMR simplifies model design while achieving superior performance in both text modeling and metadata retrieval tasks. Its efficiency and ease of use make it an ideal "off-the-shelf" solution for complex, multi-featured document datasets.
Summary updated