Faithful Path Language Modeling for Explainable Recommendation over Knowledge Graph
Giacomo Balloccu, Ludovico Boratto, Christian Cancedda, Gianni Fenu, Mirko Marras
TL;DR
PEARLM tackles the problem of explainable recommendations over Knowledge Graphs by ensuring that generated reasoning paths faithfully reflect actual KG connections. It introduces Knowledge Graph Constraint Decoding (KGCD) to enforce structural validity during decoding, and learns tokens directly from KG paths to produce plausible, verifiable explanations while boosting recommendation accuracy. A novel Path Faithfulness Rate (PFR@k) metric quantifies the integrity of generated paths, and a user study highlights trust implications of explanation fidelity. Empirical results on MovieLens1M and LastFM demonstrate that PEARLM achieves superior utility (NDCG/MRR) and favorable beyond-utility metrics, with KGCD enhancing path faithfulness and direct embedding learning driving the main performance gains. The framework is model-agnostic regarding decoding and can transfer to other path-based language models, underscoring its practical impact for trustworthy, scalable explainable recommendations over KG-backed systems.
Abstract
The integration of path reasoning with language modeling in recommender systems has shown promise for enhancing explainability but often struggles with the authenticity of the explanations provided. Traditional models modify their architecture to produce entities and relations alternately--for example, employing separate heads for each in the model--which does not ensure the authenticity of paths reflective of actual Knowledge Graph (KG) connections. This misalignment can lead to user distrust due to the generation of corrupted paths. Addressing this, we introduce PEARLM (Path-based Explainable-Accurate Recommender based on Language Modelling), which innovates with a Knowledge Graph Constraint Decoding (KGCD) mechanism. This mechanism ensures zero incidence of corrupted paths by enforcing adherence to valid KG connections at the decoding level, agnostic of the underlying model architecture. By integrating direct token embedding learning from KG paths, PEARLM not only guarantees the generation of plausible and verifiable explanations but also highly enhances recommendation accuracy. We validate the effectiveness of our approach through a rigorous empirical assessment, employing a newly proposed metric that quantifies the integrity of explanation paths. Our results demonstrate a significant improvement over existing methods, effectively eliminating the generation of inaccurate paths and advancing the state-of-the-art in explainable recommender systems.
