RecExplainer: Aligning Large Language Models for Explaining Recommendation Models

Yuxuan Lei, Jianxun Lian, Jing Yao, Xu Huang, Defu Lian +1 more
11/18/2023
cs.IRcs.AI

Official code: microsoft/RecAI (1,179 stars, MIT, last commit 2026-01-27).

Abstract

Recommender systems are widely used in online services, with embedding-based models being particularly popular due to their expressiveness in representing complex signals. However, these models often function as a black box, making them less transparent and reliable for both users and developers. Recently, large language models (LLMs) have demonstrated remarkable intelligence in understanding, reasoning, and instruction following. This paper presents the initial exploration of using LLMs as surrogate models to explaining black-box recommender models. The primary concept involves training LLMs to comprehend and emulate the behavior of target recommender models. By leveraging LLMs' own extensive world knowledge and multi-step reasoning abilities, these aligned LLMs can serve as advanced surrogates, capable of reasoning about observations. Moreover, employing natural language as an interface allows for the creation of customizable explanations that can be adapted to individual user preferences. To facilitate an effective alignment, we introduce three methods: behavior alignment, intention alignment, and hybrid alignment. Behavior alignment operates in the language space, representing user preferences and item information as text to mimic the target model's behavior; intention alignment works in the latent space of the recommendation model, using user and item representations to understand the model's behavior; hybrid alignment combines both language and latent spaces. Comprehensive experiments conducted on three public datasets show that our approach yields promising results in understanding and mimicking target models, producing high-quality, high-fidelity, and distinct explanations. Our code is available at https://github.com/microsoft/RecAI.

View on arXivView PDF

Code Implementations(1)

microsoft/RecAIOfficial100%
MIT

Bridging LLM and Recommender System.

1,179123Shell, PythonSep 7, 20238 months agoMIT
llmrecommender

Cite this paper

@article{lei2023recexplainer,
  title  = {RecExplainer: Aligning Large Language Models for Explaining Recommendation Models},
  author = {Yuxuan Lei and Jianxun Lian and Jing Yao and Xu Huang and Defu Lian and Xing Xie},
  year   = {2023},
  eprint = {2311.10947},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.10947v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.10947.svg)](https://codeofpaper.com/paper/2311.10947)

Discussion