NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Explainable Session-Based Recommendation via Path Reasoning

Yang Cao, Shuo Shang, Jun Wang, Wei Zhang

TL;DR

PR4SR is a new hierarchical reinforcement learning framework that makes session-based recommendations both more accurate and explainable. By using two levels of AI agents to navigate a knowledge graph—one to pick the most relevant "seed" item from a session and another to find a logical path to a recommendation—it bridges the gap between "black-box" sequence modeling and human-readable reasoning.

What Problem Does This Paper Address?

Session-based recommendation (SR) focuses on predicting a user's next move based on a short, anonymous sequence of interactions (like a single shopping trip). While modern deep learning models are great at predicting the "what," they are terrible at explaining the "why."

Existing attempts at "explainable" SR usually rely on Path Reasoning—finding a chain of logic in a Knowledge Graph (KG) (e.g., User bought Item A -> Item A is Brand X -> Recommend Item B from Brand X). However, these methods have two major flaws:

  1. The "Last-Item" Trap: They usually start reasoning from the very last item the user clicked. But in real life, the most important item in a session might have been clicked earlier.
  2. Ignoring "Skip" Behaviors: Users don't always browse in a linear fashion. Traditional models struggle to account for the "skips" and non-linear patterns inherent in human browsing.

Methods

The authors propose PR4SR, a Hierarchical Reinforcement Learning (HRL) framework consisting of two specialized agents:

  • The Session-Level Agent: Instead of blindly starting from the last item, this agent looks at the whole session and selects the most "essential" item to serve as the starting point for reasoning.
  • The Path-Level Agent: This agent takes the selected item and "walks" through a Knowledge Graph to find a path to a target item.

To make this work, they introduced two clever reward mechanisms:

  • Multi-Target Reward: Instead of rewarding the agent only for finding the exact next item, it provides feedback for finding any of the next $T$ items in the sequence, effectively modeling "skip" behaviors.
  • Path Midpoint Reward: To prevent the agent from getting lost in massive graphs, this reward guides the agent based on its distance to "midpoint" nodes known to connect the start and end points.

Finally, they boosted the Knowledge Graph construction itself. They used image recognition APIs to extract visual features (like "pearl" or "leather") and added them as nodes, creating new logical bridges between items that might not share a brand or category.

Datasets

The model was evaluated on four real-world datasets:

  • Amazon E-commerce: Three subsets—Beauty, Cellphones, and Baby.
  • Douban-movie: A dataset for movie recommendations.

The researchers enriched these datasets by extracting image features and splitting generic relations (like "also viewed") into more specific domain-based relations to reduce graph noise.

Key Insights and Ideas

  • The Power of Hierarchy: By separating "which item matters" from "how do we get to the recommendation," the model handles the complexity of sessions much better than a single-agent system.
  • Visual Bridges: One of the most interesting "aha" moments is the use of image features. Two items might seem unrelated in text metadata, but if both contain "pearl" elements (detected via computer vision), the path reasoning agent can now find a logical link that was previously invisible.
  • Accuracy via Explainability: Often, adding explainability hurts performance (the "interpretability-accuracy trade-off"). Here, the path reasoning actually improves recommendation accuracy because the KG provides a structured "map" that helps the model navigate sparse session data.

Key Results

PR4SR was tested against five state-of-the-art baselines (including GRU4REC, NARM, and SASRec).

  • Performance Boost: PR4SR consistently outperformed "unexplainable" versions of these models. For example, on the Beauty dataset, it improved HR@5 (Hit Ratio) by roughly 26.9% compared to the base models.
  • Superior Explanations: In a user study with 50 participants, PR4SR's explanations were preferred over the previous state-of-the-art (REKS) in over 60% of cases across all datasets.
  • Robustness: The model showed a steady increase in performance as the "action space" (the number of possible paths it could explore) increased, whereas competing models often plateaued or crashed.

Limitations and Future Work

The authors identify a few areas for growth:

  • Cross-Domain Reasoning: Currently, the model operates within specific domains (e.g., just Beauty or just Movies). Future work could explore how to reason across different categories (e.g., recommending a phone case because the user just bought a phone).
  • Graph Complexity: While the midpoint reward helps, extremely large and dense KGs still pose a computational challenge for reinforcement learning agents.
  • Real-time Constraints: The paper doesn't deeply discuss the latency of running hierarchical RL agents in a live production environment where recommendations must be served in milliseconds.

Summary updated

BibTeX
@article{cao2025explainable,
  author = {Yang Cao and Shuo Shang and Jun Wang and Wei Zhang},
  title = {{Explainable Session-Based Recommendation via Path Reasoning}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2025},
  doi = {10.1109/tkde.2024.3486326},
}
Figure