Many recommenders explain themselves by pointing at a path through a knowledge graph, a network of facts such as "Movie X was directed by Person Y". An example explanation is "you liked Memento, which shares a director with Inception." These paths are usually read off after the fact from attention weights, the normalized importance scores a model computes over its inputs. Two problems make such explanations untrustworthy. First, the paths are often nonsensical. On knowledge-graph reasoning, an audit found that over 60% of paths produced by learned multi-hop models are logically invalid, and a plain symbolic rule miner scores higher on interpretability than the neural models do Is Multi-Hop Reasoning Really Explainable?. Second, when attention is spread flat over thousands of paths, a single highlighted path may carry almost none of the prediction. Hub entities such as the "English language" node, which connects to nearly every item, soak up attention mass Knowledge Graph Pruning for Recommendation.
We propose a recommender whose score is built in two levels. The model first picks a small number of relation templates. A relation template is an abstract path shape, for example user–watched–movie–directed_by–person–directed–movie. The model then attends only over concrete paths that fit the chosen templates. It is trained so that the top template alone reproduces its prediction. The explanation is then the computation itself rather than a reading of it. Because each template is a short symbolic rule, every explanation can also be checked for logical validity.
Core Claim
Borrowing the grouped softmax of Landmark Attention and moving it from token blocks to relation templates should give three things together, which current path-based recommenders deliver only separately. It should keep accuracy comparable to flat attentive graph models. It should give explanations whose removal actually changes the recommendation. And it should raise the fraction of logically valid explanations toward what a symbolic rule miner achieves.
Landmark Attention splits a long text into blocks, each summarized by a special token. A token's weight is its weight inside its block multiplied by its block's weight. In our version, for user $u$ and candidate item $i$, the score is
$$\hat{y}_{ui} = \sum_{\tau \in T_k(u,i)} \beta_\tau(u,i) \sum_{p \in P_\tau(u,i)} \alpha_{p\mid\tau}(u,i)\, s(p).$$
Here $\tau$ ranges over relation templates, and $T_k(u,i)$ is the $k$ templates with the highest upper-level score. $\beta_\tau$ is a softmax over templates. $P_\tau(u,i)$ is the set of concrete paths from $u$ to $i$ that fit $\tau$. $\alpha_{p\mid\tau}$ is a softmax over paths within that template. $s(p)$ is a path score computed by a sequence encoder in the style of KPRN.
This factorization has two effects. A hub-entity path can only compete with other paths of its own shape, so it cannot drown out a rare but meaningful director link. And concrete paths are enumerated only for the top-$k$ templates, which replaces KPRN's exhaustive extraction of paths up to length 6.
Relation to Prior Work
The proposal responds to three groups of prior work. Each plays a different role.
The first group supplies the gap. KGAT stacks attentive propagation layers over a combined user–item–knowledge graph and explains predictions by inspecting high-attention paths afterward. KPRN scores pre-extracted paths with an LSTM and pools them. PGPR trains a reinforcement-learning agent to walk up to 3 hops, and it finds reasoning paths for about half of its top recommendations. None of the three checks whether its paths are logically valid, and none tests whether its paths are necessary for the score. We add both checks, and we change the architecture so that the second check can pass by construction.
The second group constrains the design. The interpretability audit Is Multi-Hop Reasoning Really Explainable? defines three metrics. Path Recall is the share of cases with at least one explanatory path. Local Interpretability is the share of paths that follow valid rules. Global Interpretability is their product. On WD15K the AnyBURL rule miner reaches a Global Interpretability of 38.0, while reinforcement-learning walkers reach 20 to 30. This tells us that neural path search without symbolic structure tends to learn shortcuts, which is why our upper level is symbolic. KGTrimmer shows that static pruning removes up to 90% of triplets with negligible accuracy loss. That result is a serious competitor, discussed below.
The third group supplies the method. From Landmark Attention we take the multiplicative two-level weighting and the top-$k$ expansion. From HASC we take the observation that element-level and aspect-level attention can be stacked for recommendation. HASC's upper level ranges over three fixed behavioral aspects and involves no graph hops; ours ranges over learned relation templates. Hop, Union, Generate treats multi-hop rationales as hidden choices, first selecting documents and then sentences, trained only from the answer. Our template-then-path selection follows the same logic. We avoid HUG's latent-variable marginalization, which makes it 26 times slower to train, by using a deterministic top-$k$ with a straight-through estimator, a trick that passes gradients through the discrete choice as if it were continuous.
Research Program
Template construction comes first. On each dataset we enumerate typed paths up to length 4 between users and their training items and group them by the sequence of relation types. We keep the templates that occur often enough to be learnable, capped at a few hundred. Each template gets a learned embedding that plays the role of its landmark summary. The upper-level score $\beta_\tau$ comes from the template embedding, the user representation and the item representation. We never enumerate paths for all templates at serving time.
The key training ingredient is a sufficiency loss. On each batch we recompute $\hat{y}_{ui}$ using only the single top template and penalize the gap to the full score. Combined with the ranking loss, this forces most of the score into the template the model will show the user. Without this term, the two-level model is just another attention model to be read after the fact. An ablation isolates the term.
We deliberately do not train on validity labels from mined rules. Those rules are part of the evaluation, and training on them would make validity circular. Whether a learned upper level drifts toward valid templates on its own is therefore an empirical question the study answers.
Baselines
The naive reference is a "most popular template" explainer. It recommends with a plain matrix-factorization or LightGCN-style model and explains every recommendation with the most frequent connecting template for that item. This shows how much of any validity score comes simply from common templates being valid.
The strongest accuracy baseline among the path-explaining models is KPRN. It is the closest structure to ours, with sequence-encoded paths and a pooling hyperparameter that moves between max-pooling and mean-pooling. The only relevant reported figures on its movie dataset are hit@5 of 0.676 and ndcg@5 of 0.584 KPRN. KGAT is the strongest flat attentive graph model. Its paper reports only relative Recall@20 gains of up to 8.95% on Amazon-Book and 7.18% on Yelp2018 KGAT; no absolute Recall@20 for KGAT was found on Lacuna, so we will rerun it.
PGPR is the reinforcement-learning path baseline; about 50% path coverage is reported on its Amazon data PGPR. AnyBURL rules used directly as a recommender and explainer form the symbolic baseline. Its only reported interpretability number is a Global Interpretability of 38.0, and that is on WD15K link prediction, not on recommendation Is Multi-Hop Reasoning Really Explainable?. KGTrimmer pruning followed by KGAT is the static-pruning baseline.
All models are run on the same training, validation and test splits. They use the same knowledge graph, the same embedding dimension and the same hyperparameter search budget, measured in trials and GPU-hours. Path-based models get the same maximum path length.
Beating the baselines means three things together. Recall@20 and NDCG@20 must be within about one standard error of KGAT's rerun values. Global Interpretability must be clearly higher than that of KGAT, KPRN and PGPR explanations under the same rule checker. And the drop in the recommendation under deletion, defined below, must be clearly larger than for post-hoc attention paths.
The ablations are the proposal's key comparisons. The first removes the sufficiency loss. The second replaces the two-level softmax with one flat softmax over all enumerated paths, which amounts to KPRN with attention pooling. The third uses a soft upper level with no top-$k$ selection. Together these separate the contribution of the grouping, the sparsity and the faithfulness training.
Why not just…?
Why not just filter KGAT's high-attention paths through AnyBURL rules after training? This is the most dangerous alternative. It would likely raise measured validity almost for free. What it cannot guarantee is that the surviving path is what drove the score. A valid path that was filtered in may carry a tiny fraction of the prediction. The deletion test below measures exactly this. We will run "KGAT plus rule filter" as a named baseline. If it matches our deletion effect as well as our validity, the architectural contribution is not supported, and we would report that.
Why not just use the symbolic rule miner as the recommender? AnyBURL has the best reported interpretability. But that result comes from link prediction on WD15K, and rules alone ignore collaborative signal, meaning patterns shared across similar users. We expect it to lose clearly on Recall@20. If it does not, the neural machinery is unnecessary for these datasets, and the study will show that directly.
Why not just prune the graph offline with KGTrimmer and keep flat attention? Static pruning addresses computational cost and part of the hub noise. It does not make explanations faithful or valid, and its global pruning decisions can delete rare, entity-specific evidence. We compare explanation validity and deletion effects with and without pruning. We also test the combination, since pruning and grouping by template are not mutually exclusive.
Why not just prompt a large language model to reason iteratively over the graph? Iterative reasoning with interleaved retrieval, as in IRCoT, is effective for question answering. However, iterative methods exceed 20 seconds per query on 2WikiMultiHopQA L-RAG, which is incompatible with scoring many candidate items per user. It is also not grounded in the recommender's actual computation, so it does not address the faithfulness question at all.
Proposed Experiments
Datasets are Amazon-Book and Last-FM, the combined user–item–knowledge graphs used by KGAT and KGTrimmer; the MovieLens–IMDb movie data used by KPRN; and the PGPR Amazon Clothing and Beauty graphs. The movie data is especially useful because its entities are human-readable.
Accuracy is measured with Recall@20 and NDCG@20, plus hit@5 and ndcg@5 on the movie data for comparability with KPRN. For latency we report the number of paths scored per candidate and wall-clock time per user.
For validity, we adapt the Lv et al. protocol to recommendation. Path Recall is the fraction of test recommendations with at least one explanatory path. Local Interpretability is judged in two ways. The first checks paths against AnyBURL rules mined only on a held-out portion of the graph, never on training interactions. The second uses human validity judgments on a sample of about 500 explanations from the movie data for each system, with raters blind to which system produced them. Global Interpretability is the product of Path Recall and Local Interpretability.
The decisive check is deletion faithfulness. For each explained recommendation we remove the edges of the displayed path, re-score, and record the rank drop of the item. We compare this with removing a random path of equal length that connects the same user and item, and with removing the top path of each baseline. If our explanations are faithful, deleting them should cause a much larger rank drop than for KGAT, KPRN and the rule-filtered KGAT path. The ablation without the sufficiency loss should fall back toward KGAT.
A secondary check tests the hub-dilution claim. Relative to flat attention, the two-level model should reduce the share of explanations that pass through the top 1% highest-degree entities without hurting accuracy.
The proposal fails if the rule-filtered KGAT baseline equals it on both validity and deletion effect, or if the accuracy loss exceeds the tolerance stated above.
References
- Is Multi-Hop Reasoning Really Explainable? Towards Benchmarking Reasoning Interpretability
- Knowledge Graph Pruning for Recommendation
- Landmark Attention: Random-Access Infinite Context Length for Transformers
- Explainable Reasoning over Knowledge Graphs for Recommendation
- KGAT: Knowledge Graph Attention Network for Recommendation
- Reinforcement Knowledge Graph Reasoning for Explainable Recommendation
- Explainable Social Contextual Image Recommendation with Hierarchical Attention
- Hop, Union, Generate: Explainable Multi-hop Reasoning without Rationale Supervision
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions
- Optimizing Multi-Hop Document Retrieval Through Intermediate Representations