Sequential Recommendation with Causal Behavior Discovery

Zhenlei Wang, Xu Chen, Zhenhua Dong, Quanyu Dai, Ji-Rong Wen · DOI

Introduction

Sequential recommendation systems aim to predict a user's future interactions by analyzing their historical behavior. While modern models have achieved significant success using attention mechanisms and recurrent neural networks, they primarily rely on statistical correlations. However, correlation does not imply causation. In many real-world scenarios, a user's history contains "spurious correlations"—items that appear together frequently but do not have a functional or causal relationship.

For instance, a user might purchase a printer, followed by a pack of paper, and then an ink cartridge. While paper and ink are highly correlated in the data, the actual cause of the ink purchase is the printer, not the paper. Traditional models often struggle to distinguish between these relationships, leading to redundant or irrelevant recommendations. To address this, the Causer (Causality enhanced sequential recommendation) framework was developed to discover latent causal relationships between items, "purifying" user histories to improve both accuracy and explainability.

The Causer Framework

The Causer framework integrates a causal discovery module directly into the recommendation pipeline. It addresses the challenges of scalability and structural validity through several key innovations:

1. Cluster-Level Causal Discovery

In large-scale recommendation systems with millions of items, constructing an item-to-item causal graph is computationally prohibitive. Causer mitigates this by mapping items into a smaller set of latent clusters (e.g., "office electronics" or "accessories"). The model then learns causal directions between these clusters, capturing high-level behavioral patterns that generalize better than specific item-to-item links.

2. Differentiable DAG Learning

To ensure the learned relationships form a valid Directed Acyclic Graph (DAG), Causer utilizes the NOTEARS approach. This method transforms the discrete combinatorial problem of graph discovery into a continuous optimization problem, allowing the causal structure to be learned efficiently via gradient descent alongside the recommendation objective.

3. Causal History Filtering and Hybrid Attention

Once the causal graph is established, the model performs "history purification." For any target item, Causer filters the user's history to retain only those items identified as likely "causes." This reduced, purified history serves as the input for the sequential model (such as a GRU or LSTM). Finally, a hybrid attention mechanism is applied to the filtered history to weigh the relative importance of items within the current local context.

Experimental Evaluation

The authors evaluated Causer across five diverse real-world datasets: Epinions, Foursquare, and three Amazon categories (Baby, Patio, and Video).

Performance Metrics

Causer consistently outperformed state-of-the-art baselines, including SASRec and STAMP. On average, the framework achieved a 6.1% improvement in F1 scores and an 11.3% increase in NDCG (Normalized Discounted Cumulative Gain), demonstrating superior ranking quality. The model proved to be architecture-agnostic, providing gains regardless of whether the underlying sequential engine was a GRU or an LSTM.

Human-Centric Benchmark

A significant contribution of this work is the introduction of a new human-labeled benchmark for the Amazon "Baby" category. Humans manually identified true causal links in 793 sequences to provide a ground truth for evaluation. In this test, Causer’s "explanations"—the items it identified as causes—aligned much more closely with human intuition than standard attention-based models, which frequently highlighted irrelevant but common co-occurrences.

Key Insights

  • Causality as a Stable Feature: Unlike attention weights, which are highly context-dependent and change based on the sequence, causal relationships (e.g., Printer → Ink) are stable and intrinsic. Capturing these relationships provides a more principled foundation for recommendation.
  • The Purification Effect: By removing causally irrelevant items (such as a T-shirt purchased between a coffee pot and a pot cleaner), Causer reduces the noise in the input sequence, making it easier for the underlying neural network to learn true transition patterns.
  • Mathematical Identifiability: The authors provide theoretical proof that their objective function can recover the true causal structure within a Markov equivalent class, grounding the empirical success in mathematical rigor.

Limitations and Future Work

While Causer represents a significant step forward, several areas remain for future exploration. The current model assumes static causal relationships, whereas user preferences and item roles may evolve over time. Additionally, the model is limited to observed interactions and may struggle when external factors (unobserved confounders), such as offline marketing, drive behavior. Future iterations could also expand from one-to-one causal links to more complex multi-to-one or multi-to-multi structures.

Conclusion

By shifting the focus from simple correlation to underlying causation, the Causer framework offers a more robust and explainable approach to sequential recommendation. Its ability to purify user history through differentiable DAG learning sets a new standard for both accuracy and logical consistency in the field.

Summary updated

Abstract

The key of sequential recommendation lies in the accurate item correlation modeling. Previous models infer such information based on item co-occurrences, which may fail to capture the real causal relations, and impact the recommendation performance and explainability. In this paper, we equip sequential recommendation with a novel causal discovery module to capture causalities among user behaviors. Our general idea is firstly assuming a causal graph underlying item correlations, and then we learn the causal graph jointly with the sequential recommender model by fitting the real user behavior data. More specifically, in order to satisfy the causality requirement, the causal graph is regularized by a differentiable directed acyclic constraint. Considering that the number of items in recommender systems can be very large, we represent different items with a unified set of latent clusters, and the causal graph is defined on the cluster level, which enhances the model scalability and robustness. In addition, we provide theoretical analysis on the identifiability of the learned causal graph. To the best of our knowledge, this paper makes a first step towards combining sequential recommendation with causal discovery. For evaluating the recommendation performance, we implement our framework with different neural sequential architectures, and compare them with many state-of-the-art methods based on real-world datasets. Empirical studies manifest that our model can on average improve the performance by about 7% and 11% on f1 and NDCG, respectively. To evaluate the model explainability, we build a new dataset with human labeled explanations for both quantitative and qualitative analysis.
BibTeX
@inproceedings{wang2023sequential,
  author = {Zhenlei Wang and Xu Chen and Zhenhua Dong and Quanyu Dai and Ji-Rong Wen},
  title = {{Sequential Recommendation with Causal Behavior Discovery}},
  booktitle = {ICDE},
  year = {2023},
  url = {https://openreview.net/forum?id=E3sRPUO8qiO},
}
Figure