Long-Sequence Recommendation Models Need Decoupled Embeddings

Ningya Feng, Junwei Pan, Jialong Wu, Baixu Chen, Ximei Wang, QianLi, Xian Hu, Jie Jiang, Mingsheng Long

TL;DR

Existing long-sequence recommendation models suffer from "task interference" because they force a single set of embeddings to handle two conflicting jobs: searching for relevant behaviors and representing them for prediction. The DARE (Decoupled Attention and Representation Embeddings) model solves this by using two independent embedding tables. This approach leads to significantly better accuracy, 3x faster training convergence, and a 50% boost in search speed during online serving.

What Problem Does This Paper Address?

Modern recommendation systems often deal with "lifelong" user histories—sometimes spanning thousands of clicks over several years. To handle this efficiently, engineers typically use a two-stage paradigm:

  1. Search Stage: An attention mechanism scans the long history to find the top-$k$ behaviors most relevant to the current target item.
  2. Sequence Modeling Stage: These $k$ behaviors are aggregated into a representation to predict if the user will click.

The fundamental problem is that almost all current models use a shared embedding table for both stages. The authors discover that these two tasks are fundamentally at odds. Through gradient analysis, they found that the "representation" task produces gradients five times larger than the "attention" task, effectively drowning it out.

Gradient conflict between attention and representation tasks.

Furthermore, as shown above, in nearly two-thirds of cases (64.31%), the gradients for these two tasks point in opposite directions. This "gradient conflict" means the model struggles to learn either task well: the search becomes inaccurate, and the final representation loses its discriminative power.

Methods

The authors first tried standard "decoupling" tricks from Natural Language Processing (NLP), such as using linear projection matrices (similar to the Query, Key, and Value matrices in Transformers). Surprisingly, these failed in the recommendation context. They hypothesize this is due to limited capacity: while LLMs use massive embedding dimensions (e.g., 4096), recommendation models are constrained to small dimensions (usually < 200) to prevent "interaction collapse."

To fix this, they propose DARE:

The DARE architecture decoupling attention and representation embeddings.
  • Fully Decoupled Tables: Instead of one table and a projection, DARE initializes two entirely independent embedding tables: $E^{Att}$ for calculating attention scores and $E^{Repr}$ for generating the final behavior representation.
  • Target-Aware Representation (TR): To make the representation even more effective, they use a Hadamard product between the behavior and target embeddings, ensuring the model captures specific interactions.
  • Dimension Asymmetry: Since searching (attention) is computationally expensive but doesn't require as much "nuance" as prediction, DARE allows for a lower-dimensional attention space. This accelerates the search process without sacrificing overall performance.

Datasets

The model was evaluated on:

  • Public Datasets: Taobao and Tmall (standard benchmarks for long-sequence recommendation).
  • Industrial Scale: Tencent’s advertising platform, featuring roughly 1.0 billion training samples per day and user sequences up to 6,000 items long.

Key Insights and Ideas

  • The "NLP Fix" Doesn't Work: Linear projections require high-dimensional space to effectively decouple tasks. In the low-dimensional world of RecSys, these projections just add noise or cause "over-confidence" issues.
  • Attention is Overly Sensitive to Time: The authors found that shared-embedding models like TWIN tend to over-prioritize recent behaviors regardless of category. DARE’s decoupled approach allows it to better capture "semantic-temporal" correlations—finding items that are both recent and relevant.
  • Search is "Cheap," Representation is "Expensive": You don't need a 128-dimensional vector to decide if a user's past purchase of a "keyboard" is relevant to a "mouse." A 64-dimensional vector often suffices for the search, allowing for massive serving speedups.

Key Results

  • Accuracy Boost: DARE outperformed state-of-the-art baselines (like TWIN) with AUC gains of up to 9‰ on public datasets. In the world of CTR prediction, even a 1‰ gain is considered significant.
  • Search Quality: The Normalized Discounted Cumulative Gain (NDCG) for retrieval improved by 46.5% compared to TWIN, meaning DARE is much better at actually finding the "right" behaviors in a user's history.
  • Efficiency: DARE converged 3x faster during training. More importantly, by halving the attention embedding dimension, they achieved a 50% acceleration in the search stage with minimal impact on accuracy.
  • Real-World Impact: In a 5-day A/B test at Tencent, DARE achieved a 1.47% lift in Gross Merchandise Value (GMV), which translates to hundreds of millions of dollars in potential annual revenue.

Limitations and Future Work

While DARE proves that decoupling is necessary, the authors note some lingering mysteries. Specifically, they found that linear projections in low dimensions lead to a strange "over-confidence" problem that they couldn't fully explain. Additionally, while two-stage models are currently the industry standard, the authors acknowledge the rise of "one-stage" models and suggest that the future of these competing paradigms remains an open research question.

Paper Citation: Ningya Feng, et al. "Long-Sequence Recommendation Models Need Decoupled Embeddings." ICLR 2025. Code available on GitHub.

Summary updated

BibTeX
@inproceedings{feng2025long,
  author = {Ningya Feng and Junwei Pan and Jialong Wu and Baixu Chen and Ximei Wang and QianLi and Xian Hu and Jie Jiang and Mingsheng Long},
  title = {{Long-Sequence Recommendation Models Need Decoupled Embeddings}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=jkpGIxSsUD},
}
Figure