AutoAttention: Automatic Field Pair Selection for Attention in User Behavior Modeling

Zuowu Zheng, Xiaofeng Gao, Junwei Pan, Qi Luo, Guihai Chen, Dapeng Liu, Jie Jiang

Abstract

In modern recommendation systems, modeling user interests through behavior history is essential for accurate Click-Through Rate (CTR) prediction. However, traditional attention mechanisms often rely on manual feature selection and computationally expensive Multi-Layer Perceptrons (MLPs), leading to suboptimal performance and high inference latency. This paper introduces AutoAttention, a framework that automatically identifies and selects the most relevant interactions between a user’s history and their current context. By utilizing a pruned, field-aware dot-product mechanism, AutoAttention achieves state-of-the-art accuracy while operating orders of magnitude faster than traditional deep interest models.

Introduction

Predicting user behavior is the cornerstone of personalized digital experiences, from e-commerce to social media advertising. Current state-of-the-art models, such as the Deep Interest Network (DIN), utilize attention mechanisms to weigh the relevance of a user's past actions (e.g., items clicked) against a target query. Despite their success, these models face significant hurdles in production environments. They often require manual engineering to determine which features should act as queries, and they struggle with the computational overhead of MLP-based attention units. AutoAttention addresses these challenges by automating the selection of field pairs and optimizing the underlying mathematical operations for speed and clarity.

The Challenges of Traditional Attention

The authors identify three critical flaws in existing user behavior modeling approaches:

  1. Manual Selection Bias: Engineers typically select a limited set of fields (like Item ID or Category) to serve as the query. This heuristic approach often ignores valuable signals from user demographics or environmental context (e.g., location or time of day).
  2. The Noise Trap: A "brute force" approach—using every available field as a query—introduces significant noise. Irrelevant interactions can confuse the model, leading to degraded performance and poor generalization.
  3. Computational Bottlenecks: Most models rely on MLPs to calculate attention weights. In high-traffic production settings, the latency introduced by these MLPs makes them difficult to deploy at scale.

The AutoAttention Framework

AutoAttention moves away from manual feature engineering toward an automated, learnable selection process. The framework is built on four key pillars:

All-Field Querying

Unlike previous models that limit queries to specific item attributes, AutoAttention considers all available fields—user, item, and context—as potential queries to interact with user behavior. This ensures that no predictive signal is overlooked.

Learnable Field-Pair Weights

The model assigns a learnable weight ($R$) to every possible pair of behavior fields and query fields. This allows the system to discover complex relationships, such as how a user's current "Scenario ID" (the context) might modulate the importance of their past "Category ID" history.

Automatic Selection via Pruning

To maintain efficiency and eliminate noise, AutoAttention employs an iterative pruning algorithm during training. The model identifies field pairs with low-magnitude weights and systematically removes them. This results in a sparse, highly efficient attention unit that focuses exclusively on the most predictive interactions.

Efficient Dot-Product Attention

By replacing heavy MLP structures with a simple dot-product function, AutoAttention significantly reduces the number of floating-point operations (FLOPs). This change makes the model expressive enough to capture complex interests while remaining fast enough for real-time inference.

Experimental Evaluation

The model was evaluated on two large-scale datasets to test its robustness and scalability:

  • Alibaba Display Ad CTR Dataset: 26 million records of user click logs.
  • Tencent CTR Dataset: A production-scale dataset from Tencent’s advertising logs, containing over 7 million samples.

Key Results

AutoAttention demonstrated superior performance across both datasets, outperforming established baselines like DIN, DIEN, and DSIN.

  • Accuracy Gains: The model achieved a relative AUC lift of 2.19% on the Alibaba dataset and 3.58% on the Tencent dataset. In the context of CTR prediction, where even a 0.1% lift can result in substantial revenue increases, these gains are highly significant.
  • Computational Efficiency: AutoAttention is approximately 200 to 500 times faster in terms of FLOPs compared to DNN-based models like DIEN.
  • Pareto Optimality: Performance plots indicate that AutoAttention occupies the "sweet spot" on the Pareto frontier, providing the highest AUC with inference times nearly as low as simple sum pooling.

Insights and Discussion

A primary takeaway from this research is that "less is more." Pruning irrelevant field pairs does more than just speed up the model; it actually improves accuracy by removing noisy interactions that hinder generalization. Furthermore, the model's ability to treat context as a query allows it to act as a dynamic filter. For example, if a user is currently browsing a gaming section, the model learns to prioritize their past gaming-related behaviors over unrelated historical data.

The model also successfully identified important field pairs—such as the interaction between scenario_id and category_id—that are frequently overlooked by human experts during manual design.

Conclusion and Future Work

AutoAttention represents a significant step forward in making sophisticated user behavior modeling practical for high-scale production. While highly effective within the "Embedding & MLP" paradigm, future research could explore integrating this automatic selection mechanism into temporal models, such as GRU-based architectures, to track evolving interests. Additionally, refining the pruning schedule to reduce the need for hyperparameter tuning remains a promising area for further development.

Summary updated

BibTeX
@inproceedings{zheng2022autoattention,
  author = {Zuowu Zheng and Xiaofeng Gao and Junwei Pan and Qi Luo and Guihai Chen and Dapeng Liu and Jie Jiang},
  title = {{AutoAttention: Automatic Field Pair Selection for Attention in User Behavior Modeling}},
  booktitle = {ICDM},
  year = {2022},
  doi = {10.1109/icdm54844.2022.00091},
}
Figure