How to Build Explainable Recommender Systems using Path Reasoning on Knowledge Graphs: A Tutorial with hopwise
Abstract
Recommender systems are a core testbed for user modeling and personalization research in UMAP. As these systems increasingly rely on complex models, the need for transparency, user trust, and regulatory compliance has made explainability a core requirement. Path reasoning over knowledge graphs offers a viable foundation for generating human-understandable recommendations, yet its adoption remains limited due to fragmented tools and high coding complexity. This tutorial introduces hopwise, a unified and extensible framework for building explainable-by-design recommender systems through path reasoning on knowledge graphs. In line with UMAP principles, the tutorial treats knowledge graphs and learning over them as a form of user modeling, where structured representations of users, items, and their relations drive both personalization and explanation. Through a progressive, hands-on workflow, participants will move from standard recommendation datasets to knowledge-graph representations, run and compare reinforcement learning-based and language model-based path reasoning methods, generate natural-language explanations, and evaluate recommendation utility and explanation quality. The tutorial also guides participants on how to extend the framework to new domains, reasoning or evaluation perspectives, enabling direct reuse.
Tutorial Outline
- Explainable Recommendation in UMAP (Lecture, 10 minutes): We introduce explainability as a component of user modeling and adaptation, present the full explainable recommendation pipeline, and frame knowledge graphs and path reasoning as part of personalization. We contrast post-hoc vs. explainable-by-design approaches.
- From Data to Knowledge Graphs (Hands-on, 15 minutes): We show how users, items, and interactions are represented in standard recommendation datasets, and how they are systematically transformed into knowledge graphs that support path reasoning in hopwise
- Path Reasoning Paradigms (Lecture, 10 minutes) We introduce the logic of the two main families of methods: reinforcement learning-based (e.g., PGPR, TPRec) and language model-based (e.g., PEARLM, KGGLM), with assumptions, strengths, and trade-offs
- Running Path Reasoning Methods (Hands-on, 15 minutes): We run one representative method for each family, compare their reasoning behavior, and visualize the generated explanation paths in hopwise.
- Recommendation Utility and Explainability Evaluation (Hands-on, 15 minutes): We inspect the standardized path representation, translate reasoning paths into natural language explanations, and evaluate recommendation utility and explanation path quality in hopwise.
- Extension Showcase (Hands-on, 20 minutes): We engage participants at different levels of technical depth by let each of them choosing one of the following predefined guided exercises2: running methods on another knowledge graph from hopwise, experimenting with configuration parameters of a method included in hopwise to observe patterns, or coding a simple new evaluation metric perspective
- Open Research Directions(Lecture, 5 minutes): We conclude the tutorial with a brief discussion of current challenges in explainable recommender systems, grounded in recent literature, such as explanation faithfulness, scalability, and evaluation limitations, and highlight emerging research directions. This final segment is intended to motivate participants to further experiment with and extend hopwise toward these directions after the tutorial.
Authors
Ludovico Boratto (webpage) is Associate Professor at the Dept. of Mathematics and Computer Science of the University of Cagliari (Italy). His research interests focus on recommender systems and their impact on stakeholders, with over 130 papers published in top-tier conference proceedings and journals. He has delivered tutorials and invited talks at major venues, including CIKM, UMAP, RecSys, ICDE, ECIR, WSDM, ICDM, DSAA, and ECAI. He is an editorial board member of Information Processing & Management (Elsevier) and Journal of Intelligent Information Systems (Springer). He regularly serves on the program committees of leading conferences, where he has received four outstanding contribution awards. In this tutorial, he will provide the core conceptual bridge, enabling participants to quickly build a solid foundation in responsible recommendation within the broader UMAP context
Gianni Fenu (webpage) is Full Professor at the Dept. of Mathematics and Computer Science of the University of Cagliari (Italy). His research interests focus on responsible recommender systems, digital education, and personalization. He has authored more than 150 papers in conferences and journals, and has led several national and European projects, including ILEARNTV MIUR-UE (2014-2017, 10 Me, 6 partners) and the European Research M-Commerce and Development project. In this tutorial, he will contribute the application and impact-oriented perspective, facilitating the connection of ex- plainable recommender systems to real-world adaptive platforms in education and other user-facing domains relevant to UMAP.
Mirko Marras (webpage) is Tenure-Track Assistant Professor at the Dept. of Mathematics and Computer Sci- ence of the University of Cagliari (Italy). His research ranges across various domains impacted by user modeling and personalization. He has co-authored more than 120 papers in top-tier conferences and journals, and given tutorials at ECML-PKDD, RecSys, ICDE, ECIR, WSDM, ICDM, and UMAP. He is part of the program committees of top-tier conferences, where he received four outstanding reviewer awards. He is an associate editor for Springer's Journal of Ambient Intelligence and Humanized Computing and Neural Processing Letters. In this tutorial, he will be responsible for introducing the main operative parts conceptually (knowledge graphs, path reasoning algorithms and evaluation metrics).
Francesca Maridina Malloci (webpage) Non-Tenure Track Assistant Professor at the Dept. of Mathematics and Computer Science of the University of Cagliari (Italy). Her research focuses on predictive analytics and decision-making algorithms in multi-stakeholder contexts, with particular attention to recommender systems. She has published extensively in inter- national journals and conference proceedings. She has delivered tutorials at ECML-PKDD and co-organized workshops on related themes at ECML-PKDD, UMAP, and SIGIR. She has also delivered course-level tutorials for doctoral students on hopwise, leading the preparation of the teaching materials that form the basis of the present proposal (most recently at Boise University, July 2025). In 2019, she was a visiting scientist at the Eurecat (Spain), collaborating with the Data Science and Big Data Analytics Unit.
Giacomo Medda (webpage) is Postdoctoral Researcher at the Dept. of Mathematics and Computer Science of the University of Cagliari. His research spans recommender systems, responsible artificial intelligence, graph modeling, and generative artificial intelligence. He has authored over 25 publications in leading conferences and journals. He co-edited the special issue “Knowledge Discovery from Graphs” in Springer's Data Mining and Knowledge Discovery journal and regularly serves on the program committees of UMAP, RecSys, and SIGIR. He co-organized the IRonGraphs workshop at ECIR 2024. He is a core architect and lead developer of hopwise, and will directly support participants in understanding and extending its internal components.
Alessandro Soccol (webpage) is a Research Associate at the Dept. of Mathematics and Computer Science of the University of Cagliari (Italy). His research focuses on explainable recommender systems, personalization, and uncertainty quantification. He has co-authored papers published in top-tier venues, such as CIKM and RecSys. He is a core developer of hopwise and is responsible for key path reasoning and explanability modules, which he will actively demonstrate and help participants play with.
BibTeX
@inproceedings{10.1145/3746252.3761641,
author = {Boratto, Ludovico and Fenu, Gianni and Marras, Mirko and Medda, Giacomo and Soccol, Alessandro},
title = {hopwise: A Python Library for Explainable Recommendation based on Path Reasoning over Knowledge Graphs},
year = {2025},
isbn = {9798400720406},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3746252.3761641},
doi = {10.1145/3746252.3761641},
abstract = {Explainability is becoming central to the development of responsible recommender systems, especially as path reasoning over knowledge graphs saw increased adoption for extracting structured, semantic user-item connections. However, reproducible research in such field remains limited due to fragmented implementations, missing utilities, and the lack of standardized evaluation pipelines. In this paper, we propose hopwise, an open-source library that supports the full life-cycle of explainable path reasoning recommendation methods over knowledge graphs, from knowledge graph preparation to explanation path delivery and evaluation. Rather than creating a new library from scratch, hopwise builds upon the modular and widely adopted RecBole ecosystem, enriching it with more knowledge graphs, path sampling utilities, path reasoning methods, and metrics for evaluating explanation path utility, coverage, and diversity. We show the framework's utility by means of a benchmark including two knowledge graphs and several recommendation methods. Code and Data: https://github.com/tail-unica/hopwise.},
booktitle = {Proceedings of the 34th ACM International Conference on Information and Knowledge Management},
pages = {6328–6333},
numpages = {6},
keywords = {language model, path reasoning, reproducibility, transparency},
location = {Seoul, Republic of Korea},
series = {CIKM '25}
}