RETE: Retrieval-Enhanced Temporal Event Forecasting on Unified Query Product Evolutionary Graph

Ruijie Wang, Zheng Li, Danqing Zhang, Qingyu Yin, Tong Zhao, Bing Yin, Tarek F. Abdelzaher

TL;DR

RETE is a novel framework for e-commerce forecasting that jointly predicts future search queries and product interactions by modeling them in a unified "evolutionary graph." By dynamically retrieving user-centered subgraphs and applying autoregressive temporal attention, RETE overcomes the noise of massive graphs and accurately tracks shifting user interests over time.

What Problem Does This Paper Address?

Traditional e-commerce recommendation systems typically focus on user-product interactions (clicks, purchases). However, they often overlook search queries, which act as a vital bridge between a user's latent intent and the products they eventually select.

The authors identify two primary challenges in modeling this "unified" query-product space:

  1. Data Scarcity: Most users have limited action history, making it difficult to build robust profiles. While Graph Neural Networks (GNNs) can help by aggregating information from neighbors, in a dense graph containing millions of queries and products, this often leads to over-smoothing—where user representations become indistinguishable "noise" because they've absorbed too much irrelevant information from the global graph.
  2. Interest Evolution: User preferences aren't static; they shift dynamically. A model must be "time-aware" to distinguish between a long-term interest and a fleeting search for a specific gift.

Methods

The proposed RETE (Retrieval-Enhanced Temporal Event forecasting) framework consists of three main components integrated into an autoregressive training pipeline:

  • Unified Query Product Evolutionary Graph: The model operates on a graph that combines dynamic user-item interactions (the Interaction Graph) with static product metadata like brands and categories (the Product Graph), as illustrated in Figure 2.
Figure 2: Query Product Evolutionary Graph at the𝑡-th time.
  • Ensemble Subgraph Sampler: To combat over-smoothing and noise, RETE doesn't aggregate from the whole graph. Instead, it uses an ensemble of samplers—specifically Personalized PageRank (PPR) and k-hop sampling—to dynamically retrieve a high-quality, relevant subgraph centered on the user at each time step.
  • Structural Attention Module: This module uses multi-layer graph attention to integrate information within these retrieved subgraphs. Because the propagation is constrained to a relevant local neighborhood, the model can stack more layers to capture higher-order relationships without introducing global noise (see Figure 4).
  • Temporal Attention Module: To handle interest shifts, RETE uses a temporal attention mechanism to aggregate user representations across discrete time steps ($t_1, t_2, ... t_T$). It automatically learns weights ($\beta$) to emphasize recent actions while still retaining relevant long-term context. This is done autoregressively, meaning the model can ingest new data at $T+1$ to update its forecast without needing a full retrain.
Figure 3: The framework of the proposed RETE model. We optimize the RETE model using the auto-regressive ranking loss and the knowledge graph completion loss (TransR) alternatively.

Datasets

The authors evaluated RETE on five datasets:

  • Yelp Challenge 2019: A public dataset of business reviews. The authors generated "pseudo-queries" by extracting keyphrases from reviews to simulate the search-to-interaction flow.
  • Industrial E-commerce Datasets: Four large-scale datasets from Amazon.com covering Electronics, Music, Books, and Beauty. These include real search logs and product attribute data spanning 140 days.

Key Insights and Ideas

  • Retrieval as a Denoising Filter: The core "aha" moment is that in massive, highly-connected graphs, less is more. By explicitly retrieving a small, relevant subgraph (averaging only ~38 entities) rather than aggregating from thousands of neighbors (as models like KGAT do), RETE maintains highly discriminative user profiles.
  • Mutual Benefit of Joint Prediction: The ablation studies show that query prediction significantly improves when product information is included, and vice versa. Queries provide the "intent signal" that clarifies ambiguous product clicks.
  • Handling the Cold Start: The retrieval mechanism is particularly effective for "low-data" users. By pulling in higher-order neighbors (e.g., "users who searched for X also bought Y"), RETE can synthesize a profile even when a specific user's history is sparse.

Key Results

RETE consistently outperformed state-of-the-art baselines, including factorization machines (FM, NFM), sequential models (BERT4Rec, GRU4Rec), and dynamic graph models (JODIE).

  • Overall Performance: On the Amazon Electronics dataset, RETE achieved a 13.31% gain in NDCG@20 for product prediction and an 11.17% gain for query prediction over the best-performing baseline.
  • Temporal Robustness: As shown in Figure 5, RETE's performance advantage often grows in later time steps, demonstrating its superior ability to capture evolving user intents compared to static or purely sequential models.
Figure 5: Recall@20 of each test period on Electronics, signif- icant improvements come from the last several time steps.
  • Efficiency: By using C++ for the sampling interface and focusing on small subgraphs, the authors achieved high sample efficiency, making the model suitable for real-world industrial deployment.

Limitations and Future Work

  • Time Segmentation: The authors divided their datasets into 28 discrete time steps. They acknowledge that the optimal length of these segments (e.g., hours vs. days) is a variable that requires further systematic study.
  • Query Content: For privacy reasons, the model currently only uses the structure of the query (as a node in a graph) rather than the rich semantic information within the natural language of the query itself. Integrating NLP techniques while maintaining privacy is a suggested future direction.
  • Scalability of Samplers: While PPR is efficient, the ensemble approach still adds computational overhead during the retrieval phase compared to simpler neighborhood aggregation.

Summary updated

BibTeX
@inproceedings{wang2022rete,
  author = {Ruijie Wang and Zheng Li and Danqing Zhang and Qingyu Yin and Tong Zhao and Bing Yin and Tarek F. Abdelzaher},
  title = {{RETE: Retrieval-Enhanced Temporal Event Forecasting on Unified Query Product Evolutionary Graph}},
  booktitle = {The Web Conference},
  year = {2022},
  doi = {10.1145/3485447.3511974},
}
Figure