Bag of biterms modeling for short texts

Anh Phan Tuan, Tran Xuan Bach, Thien Huu Nguyen, Ngo Van Linh, Khoat Than

TL;DR

This paper introduces "Bag of Biterms Modeling" (BBM), a novel framework for analyzing short, dynamic, and massive text collections. BBM enhances traditional topic models by representing documents using both individual words and pairs of co-occurring words (biterms), leading to improved context and performance, especially for short texts.

What Problem Does This Paper Address?

Analyzing short texts, like social media posts or search queries, is challenging due to their inherent brevity, lack of context, and the sheer volume and constant influx of new data. Traditional statistical models, which rely on word co-occurrence, struggle with the data sparsity in short texts. Furthermore, the "massive and dynamic" nature of these texts makes traditional batch learning algorithms computationally inefficient. Existing methods to address sparsity often require external data or metadata, limiting their applicability, or struggle to keep up with real-time data streams.

Methods

The core of the proposed solution is the Bag of Biterms (BoB) representation. Instead of just using individual words (Bag of Words - BoW), BoB represents a document as a collection of both single words and pairs of words that co-occur within the document. This effectively "lengthens" the document representation and captures word connotations and co-occurrences more effectively.

The Bag of Biterms Modeling (BBM) framework then integrates this BoB representation into existing probabilistic models. The key innovation is how BBM models biterms: it treats each biterm as two distinct words that share the same topic, allowing it to leverage existing inference and learning algorithms from base models like LDA and HDP. This approach avoids the need for a large biterm vocabulary, mitigating the computational drawbacks of a pure BoB representation. BBM is designed to be easily adapted for online and streaming algorithms.

Datasets

The paper evaluates its approach on four large-scale short-text datasets:

  • Yahoo Questions: A collection of user-generated questions.
  • Tweets: A large corpus of Twitter data.
  • Nytimes Titles: Headlines from the New York Times.
  • TMNtitle: A standard short-text dataset.

For evaluating text classification, they also used:

  • 20Newsgroup: A collection of medium-length texts.
  • Ohscal: A subset of OHSUMED for long texts.

Key Insights and Ideas

  • Biterms as a Context Enhancer: The simple act of including pairs of co-occurring words (biterms) significantly enriches the contextual information in short texts, making them more coherent and understandable for statistical models.
  • BBM Bridges the Gap: BBM effectively bridges the gap between the BoB representation's benefits and the computational challenges of a large biterm vocabulary by modeling biterms as pairs of words within existing topic models.
  • Model-Agnostic Framework: The BoB representation is model-independent, meaning it can be applied to various topic models (LDA, HDP) and even classification models (SVM), making BBM a versatile framework.
  • Online and Streaming Ready: BBM's design naturally lends itself to online and streaming algorithms, crucial for handling the dynamic nature of short text data.
  • BoB Outperforms BoW Even on Normal Texts: The experiments show that BoB isn't just for short texts; it also performs better than traditional BoW on medium and long texts, suggesting its general applicability.

Key Results

  • Topic Modeling: BBM, when applied to LDA and HDP (resulting in LDA-B and HDP-B), consistently outperformed their base models using BoW representation across all tested datasets in terms of Log Predictive Probability (LPP). For example, in online HDP, BoB representations consistently showed better starting points and higher overall performance than BoW.
  • Text Classification: In supervised text classification with SVM, BoB representation also achieved higher accuracy than BoW across various weighting schemas (tf, tf-idf) and datasets, including both short and normal texts.
  • Online and Streaming Performance: BBM-enhanced online and streaming algorithms (SVB-B, KPS-B) demonstrated significant improvements over their baseline counterparts, especially as more data became available. For instance, OLDA-B consistently outperformed OBTM and OLDA with BoB.
  • Efficiency: While BoB can increase vocabulary size, BBM's approach of modeling biterms as word pairs mitigates this, leading to reduced time and memory requirements compared to a naive BoB implementation.

Limitations and Future Work

  • Computational Cost of BoB: The paper acknowledges that a pure BoB representation can lead to a very large vocabulary, posing challenges for time and memory. BBM addresses this by modeling biterms within topic models, but the initial BoB representation itself can still be computationally intensive.
  • Parameter Sensitivity: The paper investigates parameter sensitivity (number of topics K, batch size) for SVB-B, showing that higher K generally yields better performance, while batch size has a relatively stable impact.
  • Future Work: The authors suggest exploring BBM's applications in more domains and investigating techniques to combine BBM with other text analysis methods beyond topic models. They also mention the potential to use word embeddings as a prior to further improve performance in streaming environments.

Summary updated

Abstract

Analyzing texts from social media encounters many challenges due to their unique characteristics of shortness, massiveness, and dynamic. Short texts do not provide enough context information, causing the failure of the traditional statistical models. Furthermore, many applications often face with massive and dynamic short texts, causing various computational challenges to the current batch learning algorithms. This paper presents a novel framework, namely bag of biterms modeling (BBM), for modeling massive, dynamic, and short text collections. BBM comprises of two main ingredients: (1) the concept of bag of biterms (BoB) for representing documents, and (2) a simple way to help statistical models to include BoB. Our framework can be easily deployed for a large class of probabilistic models, and we demonstrate its usefulness with two well-known models: latent Dirichlet allocation (LDA) and hierarchical Dirichlet process (HDP). By exploiting both terms (words) and biterms (pairs of words), the major advantages of BBM are: (1) it enhances the length of the documents and makes the context more coherent by emphasizing the word connotation and co-occurrence via bag of biterms, and (2) it inherits inference and learning algorithms from the primitive to make it straightforward to design online and streaming algorithms for short texts. Extensive experiments suggest that BBM outperforms several state-of-the-art models. We also point out that the BoB representation performs better than the traditional representations (e.g., bag of words, tf-idf) even for normal texts.
BibTeX
@misc{tuan2020bag,
  author = {Anh Phan Tuan and Tran Xuan Bach and Thien Huu Nguyen and Ngo Van Linh and Khoat Than},
  title = {{Bag of biterms modeling for short texts}},
  year = {2020},
  eprint = {2003.11948},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.11948},
}
Figure