Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
README.md
cfe_generator.py
local_push.py
toy_example.py

README.md

PRINCE: Provider-side Interpretability with Counterfactual Explanations in Recommender Systems

Author: Azin Ghazimatin (aghazima@mpi-inf.mpg.de)

Overview

In this repository, we provide the code for generating counterfactual explanations in random walk-based recommender systems in polynomial time. The explanations are in form of a subset of the user's actions, whose removal displaces the top-most recommendation. User's actions are modeled as the outgoing edges of the user's node in her interaction graph.

Usage

The relevance of the items to a user is measured based on the their PageRank scores personalized for the user. In local_push.py, the PPR (personalized PageRank) scores are computed using reverse local push algorithm (with approximation guarantee of epsilon). For a given user and her interction graph, the function "cfe_item_centric_algo_poly" in cfe_generator.py returns the counterfactual explanation and the replacement item (the new top-most recommendation).

Example

In toy_example.py, the algorithm is tested on random graphs. For example, in the graph below, the user node is shown in red (node 12). The only item nodes in the graph are nodes 13 an 14. Node 14 has higher PageRank score, hence the top recommendation. Deleting the red edges swaps the rank of the nodes 13 and 14, and makes node 13 the new top recommendation.

toy_example

You can’t perform that action at this time.