UP 5: Unbiased Foundation Model for Fairness-aware Recommendation (2024)

Abstract: Recent advances in Foundation Models such as Large Language Models (LLMs) have propelled them to the forefront of Recommender Systems (RS). Despite their utility, there is a growing concern that LLMs might inadvertently perpetuate societal stereotypes, resulting in unfair recommendations. Since fairness is critical for RS as many users take it for decision-making and demand fulfillment, this paper focuses on user-side fairness for LLM-based recommendation where the users may require a recommender system to be fair on specific sensitive features such as gender or age. In this paper, we dive into the extent of unfairness exhibited by LLM-based recommender models based on both T5 and LLaMA backbones, and discuss appropriate methods for promoting equitable treatment of users in LLM-based recommendation models. We introduce a novel Counterfactually-Fair-Prompt (CFP) method towards Unbiased Foundation mOdels (UFO) for fairness-aware LLM-based recommendation. Experiments are conducted on two real-world datasets, MovieLens-1M and Insurance, and compared with both matching-based and sequential-based fairness-aware recommendation models. Results show that CFP achieves better recommendation performance with a high level of fairness.

## introduction large language model (llm) has revolutionized the research in nlp @xcite , and its application on recommender systems (rs) also attracts soaring interest @xcite @xcite @xcite . recommender systems @xcite are algorithms designed to personalize contents or items for individual users based on their preferences. through personalized natural language prompts @xcite , large language models can serve as a backbone for rs (llm4rs) to generate personalized recommendations based on user and item information. figure 1 shows a toy input-output example of prompting llm-based recommender systems for personalized recommendation. this paper delves into the fairness of llm-based recommendation, a significant concern of rs due to its influence on individual decision-making @xcite @xcite @xcite @xcite . specifically, we aim to address user-side counterfactual fairness @xcite @xcite @xcite in rs. we ensure that the rs generates recommendations without factoring in the sensitive attributes that users wish to remain undisclosed. for instance, in a movie recommender system, users may seek recommendations that are not influenced by sensitive attributes such as race, gender, or age. for example, an elderly user may also want to watch younger generation movies to catch up with the times, and thus the user does not want to be discriminated on their age in terms of movie recommendation. as a result, recommender systems should allow users to convey their sensitive preferences and consider these criteria for generating recommendations, rather than solely relying on the recommendation model's determination. in traditional rs, each user is modeled either as a single embedding (in matching models) @xcite @xcite @xcite such that whether an item should be recommended is computed by the similarity between item embedding and user embedding, or as a sequence of item embeddings from the user's interaction history (in sequential models) @xcite @xcite @xcite ) such that the model will generate the next item based on the history. however, in the context of llm-based recommendation, the user's information is not consolidated into a singular user embedding or a sequence of item embeddings, thus rendering traditional methods inapplicable. as a result, this paper explores methods to remove sensitive information from llm-based recommendation models for fairness-aware recommendation. since llm-based recommendation models contain a large number of parameters storing a rich amount of knowledge for both language understanding and personalized recommendation, to remove unfairness from such models, three challenges need to be addressed: 1) efficient training and inference of the attribute-specific fairness-aware models for each sensitive attribute and their combinations, 2) avoiding training separate models for each combination of sensitive attributes due to a potentially exponential growth in attribute combinations, and 3) minimizing performance decrease on recommendations, as user attributes could be important for the recommendation performance. in this work, we first explore three methods to probe the unfairness of llm-based recommendation. then, we present the counterfactually-fair-prompt (cfp) method to mitigate the user-side unfairness and propose a fairness-aware foundation model, wherein sensitive user attributes, such as gender, age, occupation, etc., can be either removed or preserved based on each user's preference. we experiment on two datasets which contain sensitive attributes, movielens-1m and insurance, for fairness research, showing the effectiveness of our model in eliminating unfairness while maintaining a high level of recommendation performance. the paper proceeds as follows: section 2 presents an overview of the related work on fairness in llm and rs; section 3 briefly introduces the preliminary of llm-based recommendation and its fairness motivation; section 4 introduces the proposed cfp model. section 5 presents the experimental results for both single-attribute fair-ness and combined-attribute fairness. section 6 provides ablation studies and hyperparameter sensitivity analysis. section 7 concludes the paper. a sufficient condition for rs to be counterfactually fair is to remove the user's sensitive information when generating recommendations so that the recommendation outcome remains unchanged across various counterfactual scenarios @xcite , which is ultimately similar to the fairness of language models except that we focus on user representations other than attributerelated words. @xcite personalized counterfactual fairness for traditional rs, where @xcite is developed for matchingbased rs while @xcite is for sequentialbased rs. however, counterfactual fairness for llm-based rs has largely been unexplored, which has unique challenges to solve as we mentioned before. furthermore, existing methods are not directly applicable to llm-based recommendation. for example, li et al. requires updating all parameters in the model for each feature, which is not parameter-efficient and thus unsuitable for large language models. wu et al. appends a prefix prompt and an adapter to the model for improving fairness on sequential recommendation. however, for each attribute combination, a new prefix prompt and a new adapter must be trained from scratch, and thus the method cannot properly handle the exponential combination of attributes. as a result, developing fairness-aware methods for llm-based recommendation is highly needed. ## preliminary of llm-based recommendation foundation models such as large language lodels (llms), e.g., bert @xcite , llama @xcite , t5 @xcite , and gpt-3 @xcite , have been shown to effectively learn rich semantics from web-scale data and transfer knowledge in pre-training data to various downstream nlp tasks. for recommender systems, p5 @xcite stands as a seminal framework for foundational recommendation models, grounded in the architecture of llm backbone models, including both encoder-decoder configuration t5 @xcite and decoder-only model llama @xcite . by integrating various recommendation tasks-ranging from item generation, recommendation explanation, to rating prediction-p5 enhances the adaptability of contemporary recommendation methodologies. in our research, we employ both t5 @xcite and openllama @xcite backbones within the p5 framework to execute experi-ments targeting unfairness mitigation. in this particular section, we train p5 and probe its fairness problem to motivate the fairness research for llmbased recommendation. more specifically, we train p5 on two tasks: direct recommendation and sequential recommendation. direct recommendation generates recommendations without any user-item interaction history in the input prompt, while sequential recommendation explicitly involves useritem interaction histories. we use the simple and effective sequential id indexing method for both tasks @xcite . the prompt for each task is presented in the following square box. ## counterfactually-fair prompting we propose a counterfactually-fair-prompt (cfp) method to mitigate the unfairness of llm-based recommendation, resulting in the development of a fair and accurate recommendation foundation model. our approach is 1) personalized, since each user can choose the attributes that they wish to be treated fairly on, and 2) space and time efficient, since our approach does not require retraining the entire foundation model and only needs to train the prefix prompts. the key idea of the cfp method is to train a counterfactually-fair prompt (cfp): for encoder-decoder llm, we need an encoder prompt p enc to remove sensitive attributes and a decoder prompt p dec to preserve the model performance; for decoder-only llm, we only need a decoder prompt. our goal is to learn such cfp so that sensitive information in the user token embeddings is removed by simply concatenating the cfp with the original input prompt. cfps are trained by adversarial learning @xcite @xcite . adversarial learning requires a discriminator module @xcite aiming at precise extraction of attribute values from embeddings, while cfp aims at obfuscation of the discriminator's efforts. thus, the stronger the discriminator, the more effectively we can clean sensitive information from embeddings. according to the probing experiments in section 3, the multi-class classifier is a stronger prober than other approaches. thus, we utilize the classifier as the discriminator in adversarial learning. figure 4 shows the model architecture. we also present the results of using the soft probing prompt as a discriminator in section 6 for comprehensiveness. the model training involves an iterative process where the cfp and the classifier are optimized in succession. for each attribute k, we denote the recommendation loss as l k rec and the discriminator loss as l k dis . let m denote the recommendation foundation model and c k as the classifier. l k rec is a negative log-likelihood loss that encourages generating the correct item y: l k dis is a cross-entropy loss (cel) that encourages predicting user attribute k correctly based on the average of user-relevant token embeddings e (e.g., the tokens "user", "_", and "1" in figure 4 ) conditioned on p enc k . denoting u as the user, and c u the correct attribute value for the user, l dis is: the adversarial loss l k for each attribute k is defined as below, where λ k denotes the discriminator weight for attribute k: the training algorithm is presented in appendix c.