Abstract
Understanding user behavior in e-commerce requires modeling the complex interplay between users, products, and search queries. We present RETE, a novel framework for forecasting user events by representing interactions as a dynamic, unified evolutionary graph. RETE addresses the challenges of data scarcity and interest evolution through a retrieval-enhanced approach. By combining personalized subgraph sampling with structural and temporal attention mechanisms, RETE effectively captures shifting user intents while mitigating the over-smoothing and noise common in large-scale graph neural networks.
Introduction
In e-commerce recommendation systems, search queries serve as a vital bridge between abstract user intent and concrete product interactions. However, traditional models often neglect these query-side signals, focusing primarily on product-to-product or user-to-product edges. This oversight limits the ability to handle the "long-tail" problem of data scarcity and the dynamic nature of user interest evolution. Furthermore, applying standard Graph Neural Networks (GNNs) to massive, highly connected e-commerce graphs often leads to over-smoothing, where distinct user representations become indistinguishable due to excessive noise propagation.
Methods
RETE (Retrieval-Enhanced Temporal Event forecasting) operates on a Unified Query Product Evolutionary Graph. The framework is designed to extract high-quality signals from noisy interaction data through three core modules:
- Ensemble Subgraph Sampler: To avoid the pitfalls of global graph convolution, RETE employs an ensemble of Personalized PageRank (PPR) and k-hop sampling. This retrieves a personalized subgraph for each user at every time step, focusing on the most relevant entities (products, queries, and attributes).
- Structural Attention Module: Within the retrieved subgraphs, multi-layer graph attention is used to integrate structural information. This localized propagation allows the model to capture higher-order relationships without the noise associated with global aggregation.
- Temporal Attention Module: User history is treated as a sequence of retrieval-enhanced representations. An autoregressive temporal attention mechanism weights past events, allowing the model to prioritize recent shifts in intent while retaining relevant long-term preferences.
The model is jointly optimized to predict the next search query and product interaction using a combination of ranking loss (WARP) and knowledge graph completion loss (TransR).
Results
Evaluation on Yelp and four large-scale Amazon datasets (Electronics, Books, Music, and Beauty) demonstrates RETE's superiority over state-of-the-art baselines, including BERT4Rec and JODIE. On the Electronics dataset, RETE achieved a 13.31% improvement in NDCG@20 for product prediction and a 20.82% gain in Recall@20 for query forecasting. Case studies confirm the model's ability to track interest shifts, such as a user transitioning from tablet accessories to gaming gear, by dynamically adjusting temporal attention weights to "dim" outdated preferences.
Conclusion
RETE highlights the importance of search queries as denoising filters in e-commerce modeling. By leveraging local subgraph retrieval and temporal attention, the framework provides a robust solution for forecasting user behavior in dynamic environments. Future research directions include incorporating semantic query understanding via Large Language Models and optimizing the system for real-time industrial deployment.
Summary updated