Explaining Latent Factor Models for Recommendation with Influence Functions

Weiyu Cheng, Yanyan Shen, Yanmin Zhu, Linpeng Huang

Latent Factor Models (LFMs), such as Matrix Factorization (MF) and Neural Collaborative Filtering (NCF), are the gold standard for accuracy in recommender systems. By mapping users and items into a low-dimensional latent space, they predict preferences with high precision. However, these latent dimensions are mathematically abstract, making the models "black boxes" that are difficult for humans to interpret.

This research, originally published at AAAI 2018, introduces Fast Influence Analysis (FIA). FIA uses influence functions from robust statistics to identify which specific past user actions most heavily influenced a current recommendation, providing intuitive "neighbor-style" explanations without degrading model performance.

The Challenge of Explainability

Existing attempts to explain LFMs usually require auxiliary information like text reviews or item tags, or they modify the model itself (e.g., adding non-negative constraints), which often reduces recommendation accuracy. The authors sought to provide explanations using only the raw user-item interaction matrix, maintaining the integrity of the underlying model.

Methodology: Fast Influence Analysis (FIA)

The core engine of this research is the Influence Function, which asks: "How would the model's prediction change if we removed this specific training point?" Normally, answering this requires retraining the model for every data point—a computational impossibility for large datasets.

FIA solves this by leveraging parameter locality. In recommendation tasks, a specific prediction is primarily determined by the latent vectors of the specific user and item involved. By mathematically isolating these "active" parameters and ignoring the "noise" of the rest of the model, FIA reduces the complexity from a global problem to a local one.

Figure 1: FIA-MF on Yelp demonstrates the high fidelity of the approximation, showing a near-perfect correlation between predicted and actual changes in model output.

For neural models like NCF, FIA introduces a clever approximation that focuses on how data points change embeddings rather than the entire set of neural interaction weights. This provides a massive speedup with negligible loss in accuracy.

Key Results

The authors evaluated FIA on the Yelp and MovieLens 1M datasets, yielding several critical insights:

  • High Fidelity: The influence values calculated by FIA were highly correlated with the "ground truth" (actual retraining), achieving Pearson correlation coefficients between 0.92 and 0.99.
  • Massive Speedups: FIA was consistently 135x to 2411x faster than basic influence analysis, reducing the time to generate an explanation from nearly an hour to less than 5 seconds.
  • Sparsity of Influence: The analysis revealed that only a very small number of training points significantly impact a specific recommendation. This sparsity justifies the use of "neighbor-style" explanations, as a few key past interactions drive the model's current logic.
Figure 4: The distribution of absolute influence values across training points shows that only a handful of interactions have a significant impact on any single recommendation.

Conclusion

FIA demonstrates that developers do not have to sacrifice accuracy for transparency. By "interrogating" high-performing black-box models post-hoc, it is possible to generate human-understandable justifications for recommendations. This approach not only improves user trust but also offers a pathway to identifying potential security risks, such as data poisoning attacks that attempt to swing model predictions using a small number of influential points.

Summary updated

BibTeX
@inproceedings{cheng2019explaining,
  author = {Weiyu Cheng and Yanyan Shen and Yanmin Zhu and Linpeng Huang},
  title = {{Explaining Latent Factor Models for Recommendation with Influence Functions}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2019},
  doi = {10.1145/3292500.3330857},
}
Figure