Simple Attention-Based Representation Learning for Ranking Short Social Media Posts

Peng Shi, Jinfeng Rao, Jimmy Lin

Abstract

Ranking short social media posts like tweets is a challenging task due to their brevity and informal nature. This paper proposes a "bottom-up" approach by augmenting a simple Siamese CNN architecture with two novel, lightweight attention mechanisms: Query-Aware (QAtt) and Position-Aware (PAtt). Evaluated on TREC Microblog datasets, the proposed models outperform significantly more complex state-of-the-art architectures while achieving a 4x speedup in training and inference.

Introduction

Traditional web search ranking relies heavily on rich hyperlink structures and long-form content. Social media posts, however, lack these features, making relevance modeling notoriously difficult. While many NLP approaches favor increasingly complex neural architectures, this research investigates whether a simpler, more efficient design can achieve superior results for short-form content.

Siamese CNN Architecture

The foundation of the proposed model is a Siamese Convolutional Neural Network (CNN), a "two-tower" architecture that encodes the query and the post independently. This design allows for efficient feature extraction before the representations are combined for final scoring.

The overall Siamese CNN architecture, illustrating the flow from query and post embeddings to the final relevance score $o$.

As shown in Figure 1, the model extracts query features ($g_q$) and post features ($g_p$). A critical component, $v$, represents the interaction between the two, which is then aggregated and processed through a Multi-Layer Perceptron (MLP) to produce the final relevance score.

Novel Attention Mechanisms

The core innovation of this work is the integration of attention directly into the convolution operation, rather than as a separate post-processing layer. This allows the model to learn query-biased representations from the very first layer.

  1. Query-Aware Attention (QAtt): Instead of using static filters, QAtt creates token-specific kernels by performing an element-wise product between a query token's embedding and the convolutional weights. This "primes" the filter to detect features relevant to specific query terms.
  2. Position-Aware Attention (PAtt): This mechanism incorporates spatial context by calculating the cosine similarity between the query token and the post tokens within the current sliding window. These similarity scores act as attention weights, scaling the kernel's influence based on local text matches.
Comparison of the Query-Aware (QAtt) and Position-Aware (PAtt) attention mechanisms within the convolutional kernel.

Experimental Results

The models were evaluated using the TREC Microblog (MB) Tracks from 2011–2014. The task involved reranking the top 1,000 tweets retrieved by a standard bag-of-words baseline.

Performance and Efficiency

The BiCNN+PAtt+QL model, which combines neural scores with traditional Query Likelihood (QL), achieved state-of-the-art results across almost all datasets. For example, on the 2014 dataset, it reached an Average Precision (AP) of 0.4522, significantly higher than the previous best neural model (0.4420).

Beyond accuracy, the architecture is highly optimized for modern hardware. The authors reported a 4x speedup in both training and inference time compared to the complex MP-HCNN baseline, demonstrating that "less is more" in the context of short-text ranking.

Conclusion

This research demonstrates that integrating lightweight attention mechanisms into simple CNN architectures can yield high-performance, efficient models for social media ranking. The Position-Aware Attention (PAtt) mechanism proved particularly vital for capturing local context. Future work may explore the modular application of these encoders to more sophisticated convolutional backbones.

Summary updated

BibTeX
@inproceedings{shi2019simple,
  author = {Peng Shi and Jinfeng Rao and Jimmy Lin},
  title = {{Simple Attention-Based Representation Learning for Ranking Short Social Media Posts}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  url = {https://openreview.net/forum?id=HyZd9Q-_bH},
}
Figure