RIGHT: Retrieval-augmented Generation for Mainstream Hashtag Recommendation

Run-Ze Fan, Yixing Fan, Jiangui Chen, Jiafeng Guo, Ruqing Zhang, Xueqi Cheng

TL;DR

Researchers have developed RIGHT (RetrIeval-augmented Generative Mainstream HashTag Recommender), a framework that combines the strengths of information retrieval and text generation to suggest hashtags that are both semantically accurate and socially "mainstream." By feeding a generator relevant examples filtered through a specialized selector, the system significantly outperforms standalone large language models like ChatGPT, boosting their performance by up to 18%.

What Problem Does This Paper Address?

In the fast-paced world of social media, hashtags are the connective tissue of discourse. However, recommending the "right" hashtag is surprisingly difficult. The authors identify two main hurdles:

  1. The Freshness Problem: New topics and events emerge constantly. Traditional retrieval-based methods, which rely on a fixed list of popular tags, can't keep up with the "constant flow of up-to-date information."
  2. The Mainstream Gap: While generative models (like LLMs) are great at understanding the meaning of a tweet, they often fail to identify which specific tag is the "mainstream" choice. For example, if a user tweets about Kobe Bryant’s passing, both #KobeDead and #KobeDeath are semantically correct, but only one might be the widely adopted, "mainstream" tag that ensures maximum visibility.

Previous methods were either good at being mainstream but inflexible (retrieval) or flexible but socially "out of the loop" (generation).

Methods

The authors propose a three-stage pipeline called RIGHT, illustrated in the framework overview below:

Fig. 2. Our RIGHT framework consists of a retriever, a selector, and a generator.
  • Retriever: When a user writes a tweet, the system searches a massive, live corpus of tweet-hashtag pairs to find the most similar existing posts. It uses both sparse retrieval (BM25) and dense retrieval (SimCSE) to find relevant matches.
  • Selector: This is the "secret sauce." Raw retrieval often brings in "low-quality" noise—tags that are relevant to a specific retrieved tweet but not the broader topic (e.g., a location tag like #ATL). The Selector uses contrastive learning and three specific signals—tweet-tweet similarity, tweet-hashtag similarity, and hashtag frequency—to filter and rank the best mainstream candidates.
  • Generator: Finally, the input tweet and the top-ranked hashtags are fed into a generator (like T5 or ChatGPT). The generator uses this "context" to produce the final recommendation, allowing it to either adopt the retrieved tags or generate new ones based on its internal knowledge.

Datasets

The researchers evaluated RIGHT on two large-scale datasets representing different linguistic and social contexts:

  • THG (English Twitter): Over 200,000 tweet-hashtag pairs crawled from official media and high-influence accounts to ensure high-quality "mainstream" labels.
  • WHG (Chinese Weibo): Over 300,000 pairs from major Chinese outlets like People's Daily.
Table 1. Data statistics for the English Twitter hashtag generation (THG) dataset and the Chinese Weibo hashtag generation (WHG) dataset. # T-H pairs denotes the number of tweet-hashtags pairs. #AvgHashtags denotes the average number of hashtags in each tweet-hashtags pair. AvgTweetLen denotes the avenge length (token level) of all input tweets. AvgHashtagLen denotes the average length (token level) of all hashtags.

Key Insights and Ideas

  • Semantic Correctness $\neq$ Social Utility: A model can understand a tweet perfectly and still suggest a "dead" hashtag. The paper highlights that "mainstreamness" is a global signal that requires looking at what everyone else is using, not just what the individual tweet means.
  • The Selector is Essential: Simply doing Retrieval-Augmented Generation (RAG) isn't enough for social media. Because social data is noisy, the Selector acts as a crucial quality filter. Without it, the generator can be misled by irrelevant tags that happened to appear in a similar tweet.
  • LLMs have a "Mainstream Knowledge Gap": Even powerful models like ChatGPT lag behind specialized models in this task because they lack real-time access to the specific social conventions of a platform's hashtag usage. Providing them with retrieved context (RAG) bridges this gap effectively.

Key Results

The RIGHT framework achieved significant improvements over state-of-the-art baselines:

  • Outperforming SOTA: RIGHT outperformed previous specialized models like SEGTRM and standard Seq2Seq models across all metrics (ROUGE and F1 scores).
  • Boosting ChatGPT: One of the most impressive findings was that integrating RIGHT's retrieval/selection results into a ChatGPT prompt improved its F1@1 performance by 12.7% on Twitter and 18.3% on Weibo.
  • Qualitative Success: As shown in the comparison below, RIGHT successfully identifies mainstream tags (like #KobeDead) where standalone generative models might suggest semantically similar but less popular alternatives (like #KobePassingAway).
Fig. 1. Illustration of evaluating hashtag recommendation with different methods.

Limitations and Future Work

  • Component Independence: Currently, the retriever, selector, and generator are trained or optimized somewhat independently. The authors suggest that a co-training approach that jointly refines all three components could yield even better results.
  • Inference Cost: While the framework is effective, using large-scale generators like ChatGPT in a RAG pipeline can be expensive and slower than smaller, specialized models.
  • Optimal Strategies: The authors note that future work should explore more sophisticated strategies for combining the retrieval and generation signals beyond simple concatenation.

Summary updated

BibTeX
@misc{fan2023right,
  author = {Run-Ze Fan and Yixing Fan and Jiangui Chen and Jiafeng Guo and Ruqing Zhang and Xueqi Cheng},
  title = {{RIGHT: Retrieval-augmented Generation for Mainstream Hashtag Recommendation}},
  year = {2023},
  eprint = {2312.10466},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.10466},
}
Figure