CausalRec: A CausalBoost Attention Model for Sequential Recommendation

Yunbo Hou, Tianle Yang, Ruijie Li, Li He, Liang Wang, Weiping Li, Bo Zheng, Guojie SongarXiv 2025 · OpenReview

Abstract

Recent advances in correlation-based sequential recommendation systems have demonstrated substantial success. Specifically, the attention-based model outperforms other RNN-based and Markov chains-based models by capturing both short- and long-term dependencies more effectively. However, solely focusing on item co-occurrences overlooks the underlying motivations behind user behaviors, leading to spurious correlations and potentially inaccurate recommendations. To address this limitation, we present a novel framework that integrates causal attention for sequential recommendation, CausalRec. It incorporates a causal discovery block and a CausalBooster. The causal discovery block learns the causal graph in user behavior sequences, and we provide a theory to guarantee the identifiability of the learned causal graph. The CausalBooster utilizes the discovered causal graph to refine the attention mechanism, prioritizing behaviors with causal significance. Experimental evaluations on real-world datasets indicate that CausalRec outperforms several state-of-the-art methods, with average improvements of 7.21% in Hit Rate (HR) and 8.65% in Normalized Discounted Cumulative Gain (NDCG). To the best of our knowledge, this is the first model to incorporate causality through the attention mechanism in sequential recommendation, demonstrating the value of causality in generating more accurate and reliable recommendations.

Introduction: The Challenge of Spurious Correlations

Most modern sequential recommendation systems, such as SASRec, rely heavily on item correlations. These models identify patterns in item co-occurrences—for example, if users frequently purchase a phone case and a charging cable in the same session, the model assumes a strong relationship between them.

However, correlation does not imply causation. A user might purchase both items because they recently bought a new smartphone. In this scenario, the smartphone is the causal driver, while the case and cable are subsequent effects. Relying strictly on co-occurrence leads to "spurious correlations," where the system recommends items based on coincidental patterns rather than the user's actual underlying motivation.

Causal vs. Correlational logic in recommendations

Methodology: The CausalRec Framework

CausalRec addresses these limitations by enhancing the standard Transformer attention mechanism with causal awareness. The framework consists of two primary innovations:

1. Causal Discovery Block

This module treats user behavior sequences as a Structural Causal Model (SCM). To handle the computational complexity of discovering causal graphs in large datasets, CausalRec utilizes a continuous optimization approach (inspired by the NOTEARS method) to search for a Directed Acyclic Graph (DAG). A key theoretical contribution of this work is the proof that the Layer Normalization typically found in Transformers satisfies the "equal noise variance" condition, which mathematically guarantees that the learned causal graph is identifiable and unique.

2. CausalBooster

Rather than simply filtering out non-causal items—which can lead to information loss—the CausalBooster employs a multiplicative enhancement strategy. It takes standard attention weights and "boosts" them when a causal relationship is identified in the discovered graph. This ensures the model prioritizes causally significant signals while remaining robust to the inherent noise in real-world user history.

The CausalRec architecture featuring the Causal Discovery Block and CausalBooster

Experimental Evaluation

The model was rigorously tested against state-of-the-art baselines (including SASRec and BSARec) across four diverse datasets: MovieLens-1M, LastFM, Foursquare, and KGRec-music.

CausalRec consistently outperformed all baselines, achieving an average improvement of 7.21% in Hit Rate (HR@10) and 8.65% in NDCG@10. The most significant gains were observed on the Foursquare dataset, which saw a 15.49% increase in NDCG, suggesting that causal relationships are particularly influential in location-based check-in behaviors.

Conclusion

By moving beyond simple correlation and incorporating causal discovery directly into the attention mechanism, CausalRec provides a more "rational" approach to sequential recommendation. This framework not only improves predictive accuracy but also offers a path toward more explainable and reliable recommendation systems.

Summary updated

BibTeX
@misc{hou2025causalrec,
  author = {Yunbo Hou and Tianle Yang and Ruijie Li and Li He and Liang Wang and Weiping Li and Bo Zheng and Guojie Song},
  title = {{CausalRec: A CausalBoost Attention Model for Sequential Recommendation}},
  year = {2025},
  eprint = {2510.21333},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.21333},
}
Figure