CauseRec: Counterfactual User Sequence Synthesis for Sequential Recommendation

Shengyu Zhang, Dong Yao, Zhou Zhao, Tat-Seng Chua, Fei WuSIGIR 2021 · DOI

Abstract

Learning user representations based on historical behaviors lies at the core of modern recommender systems. Recent advances in sequential recommenders have convincingly demonstrated high capability in extracting effective user representations from the given behavior sequences. Despite significant progress, we argue that solely modeling the observational behaviors sequences may end up with a brittle and unstable system due to the noisy and sparse nature of user interactions logged. In this paper, we propose to learn accurate and robust user representations, which are required to be less sensitive to (attack on) noisy behaviors and trust more on the indispensable ones, by modeling counterfactual data distribution. Specifically, given an observed behavior sequence, the proposed CauseRec framework identifies dispensable and indispensable concepts at both the fine-grained item level and the abstract interest level. CauseRec conditionally samples user concept sequences from the counterfactual data distributions by replacing dispensable and indispensable concepts within the original concept sequence. With user representations obtained from the synthesized user sequences, CauseRec performs contrastive user representation learning by contrasting the counterfactual with the observational. We conduct extensive experiments on real-world public recommendation benchmarks and justify the effectiveness of CauseRec with multi-aspects model analysis. The results demonstrate that the proposed CauseRec outperforms state-of-the-art sequential recommenders by learning accurate and robust user representations.

Introduction

Modern recommender systems rely on sequential recommendation to predict a user's next interaction based on their history. However, these systems face two major hurdles: natural noise and data sparsity. Not every click reflects a true interest; users are often distracted by "caption bias," accidental clicks, or temporary promotions. Modeling these as "true" preferences creates a brittle system. Furthermore, most users only interact with a tiny fraction of available items, making it hard for models to generalize from sparse observations.

Current models are primarily "observational," focusing only on what a user did. CauseRec shifts this paradigm by asking a counterfactual question: "How would the user's representation change if we intervened on their history?" By modeling what a user might have done, the framework learns user representations that are significantly more robust to noise and effective at predicting future behavior.

Methodology

The CauseRec framework utilizes Counterfactual User Sequence Synthesis and Contrastive Learning to build robust representations. The process follows three main steps:

  1. Concept Identification: The model identifies "indispensable" concepts (items representing true interest) and "dispensable" concepts (likely noise). This occurs at both the item-level (treating each item as a concept) and the interest-level (using attention to group items into abstract clusters).
  2. Counterfactual Synthesis: The model creates synthetic sequences. Positive Counterfactuals replace dispensable items, expecting the user representation to remain stable. Negative Counterfactuals replace indispensable items, creating "hard negatives" that should result in a significantly different representation.
  3. Contrastive Learning: Using a triplet margin loss, the model learns to "pull" the original representation closer to positive counterfactuals and "push" it away from negative ones.
The CauseRec architecture, illustrating the base model, counterfactual transformation, and contrastive learning stages.

The authors propose three variants: CauseRec-Item (model-agnostic), CauseRec-Interest (focusing on abstract interests), and CauseRec-H (a hierarchical version combining both).

Experimental Setup

The model was evaluated on three widely used public benchmarks:

  • Amazon Books: A large-scale dataset of book reviews and interactions.
  • Yelp2018: User check-ins and reviews for businesses like restaurants.
  • Gowalla: A location-based social network check-in dataset.

A "10-core" setting was applied to Yelp and Gowalla to ensure users and items had at least ten interactions, providing sufficient sequence data for modeling.

Results and Analysis

CauseRec-H consistently outperformed state-of-the-art baselines like MIND, ComiRec, and GRU4Rec across all metrics (Recall, NDCG, and Hit Rate).

Performance comparison of CauseRec against state-of-the-art baselines across three datasets.

Key findings include:

  • Significant Gains: On Amazon Books, CauseRec-H achieved a 22.1% relative improvement in NDCG@50 over the strongest baseline.
  • Hard Negatives via Intervention: Standard models often use random items as negatives. CauseRec creates "hard negatives" by surgically removing core interests from a user's real history, providing a more challenging and effective training signal.
  • Robustness: By training the model to ignore dispensable items, it becomes naturally robust against accidental clicks or clickbait.
  • Ablation Studies: Results confirmed that both "pushing" from negative counterfactuals and "pulling" toward positive ones are necessary, with the "push" from hard negatives generally providing a larger performance boost.

Conclusion

CauseRec addresses the brittleness of observational sequential recommenders by modeling the counterfactual world. By identifying and intervening on core user interests, it learns representations that are both accurate and robust to noise. While current versions use heuristic thresholds for concept identification, future work could explore more sophisticated selection mechanisms and extend counterfactual transformations to the fine-grained ranking phase of recommendation.

Summary updated

BibTeX
@inproceedings{zhang2021causerec,
  author = {Shengyu Zhang and Dong Yao and Zhou Zhao and Tat-Seng Chua and Fei Wu},
  title = {{CauseRec: Counterfactual User Sequence Synthesis for Sequential Recommendation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2021},
  doi = {10.1145/3404835.3462908},
}
Figure