Fairness recommendation method and device based on bilateral adversarial learning for sensitive attribute filtering
By employing a two-sided adversarial learning approach, sensitive information is filtered from both the user and item sides, thus solving the recommendation discrimination problem caused by considering only the user side in existing technologies and achieving higher recommendation accuracy and fairness.
Patent Information
- Application Number
- CN202311127004.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-09-01
AI Technical Summary
Existing recommendation systems, when filtering sensitive user information to achieve fairness, only consider the user side while ignoring the potential correlation between items and the user's sensitive information, leading to discriminatory issues in recommendations.
We employ a two-sided adversarial learning approach to filter sensitive information from both the user and item sides. By designing discriminators on the user and item sides and combining them with multi-task learning, we remove sensitive information from users and items, thereby improving the fairness of recommendations.
It effectively eliminates sensitive information that leads to unreasonable recommendations, improves the accuracy and fairness of recommendations, and performs particularly well in terms of counterfactual fairness and group fairness.
Smart Images

Figure CN117112905B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of recommendation systems, and more particularly, relates to a sensitive attribute filtering fairness recommendation method and device based on bilateral adversarial learning. BACKGROUND
[0002] Recommendation systems have become an integral part of our daily lives, and with them come the issue of fairness in recommendations, which has attracted increasing attention and become the focus of researchers, such as user discrimination. Discriminatory recommendations are often based on users' sensitive information rather than preferences to recommend items. To address this issue, filtering sensitive information in the recommendation process as an important strategy to mitigate discrimination has been proposed. The core idea of this method is to remove users' sensitive information and obtain an unbiased user representation to predict their preferences for items.
[0003] In recent years, some research has focused on generating fair recommendation lists by hiding users' sensitive information. Some of these studies use an adversarial learning framework to remove sensitive information from user representations to obtain an unbiased user representation to predict their preferences for items. In this way, the recommendation system can more fairly recommend items and avoid discriminatory recommendations. Another solution is orthogonal regularization, which can orthogonalize biased and unbiased user representations, thereby removing users' sensitive information from the unbiased representation. Recently, a prompt-based method has been proposed, which can flexibly select multiple sensitive attributes of users and ensure fairness in the learned user representation for different attribute combinations, thereby implementing recommendation modeling according to users' specific needs. Although these methods are very effective in improving fairness performance, they only consider filtering sensitive information from the user side, ignoring the impact of the item side.
[0004] In fact, the information of the item may also be related to the sensitive information of the user, and this correlation may be derived from the interaction between the user and the item. For example, based on the content information of the item, the gender information of the user can be easily predicted. In a movie recommendation scenario, movies usually have multiple attributes, such as genre, release year, etc. Similarly, users also have some sensitive attributes, such as gender, age, etc. Some movie attributes may be related to the sensitive attributes of the user. For example, romantic movies are more popular with female users, while action movies are more popular with male users, thereby establishing a correlation between movie type and user gender. Similarly, other attributes of the item may also be related to the sensitive attributes of the user.
[0005] If we ignore the wide correlation between the sensitive information of items and users and only filter the sensitive information from the user side, it will still cause discrimination in recommendations. For example, romantic and family movies that are more relevant to women may frequently appear in the recommendation list of female users, while action and crime movies that are male-oriented may more frequently appear in the recommendation list of male users. This means that gender information can be easily inferred from the recommendation list. Therefore, it is necessary to focus on the potential correlation between items and users and consider the sensitive information on the item side. SUMMARY
[0006] In view of the above defects or improvement needs of the prior art, the present application provides a sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning, which aims to improve the recommendation fairness for user sensitive information. In this paper, we propose a fair-aware recommendation algorithm based on filtering user-end and item-end sensitive information to solve the discrimination problem. The algorithm consists of two main parts: the recommendation part and the adversarial part. In the recommendation part, user and item information is embedded, and a classic recommendation algorithm is used to predict the user's rating of the item. The adversarial part aims to remove sensitive information and contains three different discriminators. These discriminators aim to remove sensitive information from three different aspects: user side, item side, and user-item side.
[0007] To achieve the above object, according to one aspect of the present application, a sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning is provided, comprising the following steps:
[0008] (1) According to the user, item information and the interaction relationship therebetween, a recommendation part model is determined, and a classic recommendation algorithm is used to predict the user's rating of the item;
[0009] (2) According to the user features and item ratings, a user-side adversarial learning network is designed to filter sensitive information from the user side;
[0010] (3) According to the statistical information of the sensitive feature relationship between items and users in the existing data set, the potential association of user and item sensitive information is established to filter sensitive information from the item side;
[0011] (4) The sensitive information is filtered from the user-item side in combination with the user ratings and item information;
[0012] (5) The recommendation part and the adversarial part of the model are trained and updated simultaneously in a multi-task learning manner.
[0013] In one embodiment of the present application, the step (1) specifically comprises the following sub-steps:
[0014] (1.1) According to the feature information of the user and the item, the user embedding and the item embedding are obtained through an embedding layer and a fully connected layer; let denotes a set of users, denotes a set of items; user embeddings are generated by embedding layers and fully connected layers and item embeddings , as shown below:
[0015]
[0016]
[0017] where, denotes the number of attributes of users and items , is a one-hot vector of dimension of the attribute category of users , is a one-hot vector of dimension of the category content of items , , , , are embedding matrices of user and item attributes , , and , are parameters of the fully connected layers for users and items;
[0018] (1.2) After the user embeddings and item embeddings are concatenated, a prediction result is obtained through a decision layer and an output layer composed of an N-layer fully connected neural network, which is represented as:
[0019]
[0020]
[0021]
[0022]
[0023] where, and are the weight matrix and bias vector of the th decision layer, and are the weight matrix and bias vector of the output layer; and denote the activation functions of the decision layer and the output layer, respectively; is the predicted rating of users to items ;
[0024] (1.3) For users , the recommendation part constitutes the loss of recommendation , which is calculated by the cross-entropy function and is expressed as:
[0025]
[0026] wherein, is the set of items scored by the user u, is the set of items scored by the user u, is the true score of the item by the user.
[0027] In an embodiment of the present application, the step (2) comprises the following sub-steps:
[0028] (2.1) In order to filter out sensitive information from the user representation, a discriminator is designed to be against the recommender; the discriminator infers the sensitive information of the user based on the user representation; because the score reflects the user's preference, the actual score of the user on the item is used as external information to assist prediction; and the scores are normalized;
[0029] The discriminator is composed of one fully connected layer and one output layer, and the network is expressed as:
[0030]
[0031] (2.2) The discriminator loss is calculated by the cross-entropy function, and the formula is:
[0032]
[0033] wherein, is the set of sensitive features, is the value of the feature of the user, is the predicted value of the feature of the user.
[0034] In an embodiment of the present application, the step (2.1) specifically comprises the following sub-steps:
[0035] When the highest score given by the user is , the normalized score of the user on the item is defined as:
[0036]
[0037] in, User For items , User The lowest score given User The highest score given will map the scoring range to .
[0038] In one embodiment of the present invention, step (3) specifically includes the following sub-steps:
[0039] (3.1) To filter sensitive information related to items, design a discriminator. In contrast to the recommender, the discriminator Inferring item bias based on item representation, where the true bias of an item is determined by its attributes, and calculating item bias... Bias score as follows:
[0040]
[0041] in, It is the set of attributes of the items being considered. It is an item Sensitive attributes A collection of all categories, It is one of the sensitive attributes. "A biased set of categories, with thresholds determined based on the inherent distribution of item attributes within the dataset." The score falls within the interval Any one of them, based on the range to which it belongs, determines the true sensitivity bias of the item. .
[0042] (3.2) This part of the discriminator The network consists of one fully connected layer and one output layer, and is represented as follows:
[0043]
[0044] in, The discriminator loss is the bias of the predicted sensitive attributes of item i. The formula for calculating cross-entropy is:
[0045]
[0046] In one embodiment of the present invention, step (4) specifically includes the following sub-steps:
[0047] (4.1) In addition to the user representation directly reflecting the user attribute characteristics, the user's rating of the item and the item rated by the user also reveals the user's sensitive information, so a discriminator is introduced , which is opposite to the recommender, aims to remove the user's sensitive information from the user's and item's ratings; the discriminator infers the user's sensitive attributes based on the user's ratings of the items and the item representation; wherein the rating information includes the real rating and the predicted rating of the item, and the item representation includes the single item representation , the fused representation of the item ;
[0048] Discriminator consists of a fully connected layer for rating input, a fully connected layer for item input and an output layer, denoted as:
[0049]
[0050] wherein is the inference result of the user's sensitive information ;
[0051] (4.2) The discriminator loss is calculated by the cross-entropy function, and the formula is:
[0052]
[0053] wherein is the set of sensitive features, is the value of the user's feature , is the predicted value of the user's feature . In an embodiment of the present application, the step (4.1) specifically comprises the following sub-steps:
[0054] (4.1.1) Calculation of single item representation The formula is as follows:
[0055]
[0056]
[0057] wherein, is the weight of the item to the user ; the rating directly reflects the user's preference for the item, the item that the user likes will determine the user's preference to a greater extent, and the item with a higher rating will have a greater impact on the user's preference than the item with a lower rating, so the rating is used as the weight here:
[0058]
[0059] (4.1.2) Item fusion representation The calculation formula is as follows:
[0060]
[0061] in User The number of items rated, It is an item For users The rating directly reflects a user's preference for an item; items a user likes will have a greater influence on their preferences, and items with higher ratings will have a greater impact on user preferences than items with lower ratings. Therefore, the rating is used as a weight here.
[0062]
[0063] In one embodiment of the present invention, step (5) specifically includes the following sub-steps:
[0064] (5.1) In order to fully consider the fairness of various aspects and the removal of sensitive information, the total loss of the adversarial part The description is as follows:
[0065]
[0066] in , and These are hyperparameters used to flexibly control the loss function;
[0067] (5.2) Implement the meta-learning recommendation system on the meta-learning recommendation system framework. Update the meta-model through a series of tasks, so that the output model can adapt to the fine-tuning of new user tasks more quickly. The MAML-based meta-learning recommendation framework will train a meta-model through multiple user tasks to output the initialization parameters of the user model. The framework performs gradient updates in two steps, namely the inner loop and the outer loop. In the inner loop, the goal is to train the model for multiple users. The loss is calculated based on the support set of the user task and the user model is updated. In the outer loop, the goal is to train the meta-model that outputs the initialization parameters of the user model. The loss of all tasks in the inner loop on their respective query sets is summarized and the model is updated.
[0068] The unit of training data and test data in meta-learning is a task, and a task includes a support set and a query set, the support set is used for updating the task model, and the query set is used for testing the task model and updating the meta-model; in the inner loop, the recommendation part does not consider the update of the cheating discriminator, and meanwhile, the first embedding part of the user and the item is not updated; in the outer loop part, the meta-model is updated as a whole; the loss function of the model is represented as: represents the recommendation part of the model, represents the adversarial part of the model; the parameters of the two parts included in the model are represented as , wherein is the parameter of the recommendation part, is the parameter of the adversarial part; the target function of the model is represented as:
[0069]
[0070] , wherein represents the parameters involved in the loss, and .
[0071] According to another aspect of the present application, there is also provided a sensitive attribute filtering fairness recommendation device based on double-sided adversarial learning, comprising at least one processor and a memory, the at least one processor and the memory are connected through a data bus, the memory stores instructions executable by the at least one processor, and the instructions are used to complete the sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning after being executed by the processor.
[0072] Overall, compared with the prior art, the above technical scheme conceived by the present application has the following beneficial effects:
[0073] (1) The improved algorithm considers the sensitive information existing on the item side and the user-item side, eliminates the sensitive information leading to unreasonable recommendation, and thus improves the recommendation accuracy;
[0074] (2) The adversarial learning module on the user side effectively improves the user sensitive information filtering effect through the score normalization method, thereby improving the individual fairness;
[0075] (3) The adversarial learning module on the item side mines the potential association between the user and the item attribute, filters the user sensitive information from the item perspective, and effectively improves the comprehensive fairness of the algorithm;
[0076] (4) The adversarial learning module on the user-item side also adds the fusion of the user's item set when considering single item, and overall improves the fairness performance of the algorithm. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1is a flow chart of the method of the present application;
[0078] Figure 2 is a summary of the existing fairness recommendation technology;
[0079] Figure 3 is the overall framework diagram of the sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning in the embodiment of the present application;
[0080] Figure 4 is a line chart of the influence of the change of hyperparameters on the model on the ML-100K dataset;
[0081] Figure 5 is a line chart of the influence of the change of hyperparameters on the model on the BookCrossing dataset;
[0082] Figure 6 is a line chart of the influence of the change of hyperparameters on the model on the ML-1M dataset. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present application clearer and more comprehensible, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0084] The technical terms of the present application will be explained and described first as follows:
[0085] Mean Absolute Error (MAE, Mean Absolute Error): represents the average of the absolute error between the predicted value and the observed value, and let represents the test user set, represents the query set of the user , and the MAE calculation method is:
[0086]
[0087] Normalized Discounted Cumulative Gain (NDCG, Normalized Discounted Cumulative Gain): represents the normalized DCG to measure the top-k ordering performance of the recommendation list. Let represents the true rating of the user to the top-k items. calculate the first k actual rating values ordered by the predicted rating value; The actual rating value of the top-k ranking is calculated, which is the best possible value. The calculation method of NDCG is as follows:
[0088]
[0089]
[0090] Area under curve (AUC, Area Under Curve): the area surrounded by the coordinate axis under the ROC curve, used to measure the individual fairness of the recommendation system.
[0091] Counterfactual fairness (CF, Counterfactual Fairness): the difference in recommendation results after reversing the sensitive information, used to measure the counterfactual fairness of the recommendation system. The user's sensitive attribute is represented by , the other attribute is represented by , and the flipped sensitive attribute is represented by . CF can be calculated as follows:
[0092]
[0093] Group fairness (GF, Group Fairness): the difference in recommendation performance between groups with different sensitive attributes, used to measure the group fairness of the recommendation system. Two user groups divided according to the sensitive attribute are represented by , and the recommendation performance of the group is calculated by MAE. GF can be calculated as follows:
[0094]
[0095] The solution to the difficulties existing in the prior art is:
[0096] The prior art only considers filtering on the user side to obtain more fair recommendations, ignoring the fact that there is also information on the item side that is potentially associated with user sensitive information. The present application mines the potential relationship between items and user sensitive information, and reasonably filters sensitive information from both the user and item sides, achieving more fair recommendations through more comprehensive filtering techniques.
[0097] As shown in Figure 3 , the sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning includes the following steps:
[0098] (1) According to the user, the item information and the interaction relationship between them, determine the recommendation part model, use the classical recommendation algorithm to predict the user's rating of the item. Specifically, it includes the following sub-steps:
[0099] (1.1) According to the feature information of the user and the item, the user embedding and the item embedding are obtained through the embedding layer and the full connection layer; Let represent the user set, represent the item set; The user embedding and the item embedding are generated through the embedding layer and the full connection layer, as shown below:
[0100]
[0101]
[0102] Among them, respectively represent the number of attributes of the user and the item , is the one-hot vector of dimension of the attribute category of the user , is the one-hot vector of dimension of the classification content of the item , , is the embedding matrix of the user and item attribute , , , , and , are the parameters of the full connection layer for the user and the item;
[0103] (1.2) After the user embedding and the item embedding are concatenated, the prediction result is obtained through a decision layer and an output layer composed of N layers of full connection neural network, which is represented as:
[0104]
[0105]
[0106]
[0107]
[0108] Among them, and are the weight matrix and the bias vector of the decision layer, and is the weight matrix and bias vector of the output layer; and denote the activation function of the decision layer and the output layer, respectively; is the predicted rating of item by user ;
[0109] (1.3) For user , the recommendation part constitutes the loss of recommendation which is calculated by the cross-entropy function, denoted as:
[0110]
[0111] where, is the set of items scored by user u, is the true rating of item by user .
[0112] (2) According to the user features and item ratings, a user-side adversarial learning network is designed to filter sensitive information from the user side. Specifically, the following sub-steps are included:
[0113] (2.1) In order to filter sensitive information from the user representation, a discriminator is designed to be in opposition to the recommender; the discriminator infers the sensitive information of the user based on the user representation; because the ratings reflect the user's preferences, the actual ratings of items by the user are used as external information to assist in prediction; and the ratings are normalized;
[0114] This part of the discriminator is composed of one fully connected layer and an output layer, and the network is denoted as:
[0115]
[0116] When the highest rating given by the user is , the normalized rating of item by user is defined as:
[0117]
[0118] where, is the rating of item by user , is the lowest rating given by the user , and is the highest rating given by the user , which maps the rating interval to .
[0119] (2.2) The discriminator loss The discriminator loss is calculated by the cross-entropy function as follows:
[0120]
[0121] wherein is the set of sensitive features, is the value of the feature of the user is the predicted value of the feature of the user . (3) According to the statistical information of the sensitive feature relationship between the items and the users in the existing data set, the potential association between the users and the sensitive information of the items is established, and the sensitive information is filtered from the item side. Specifically, the following sub-steps are included:
[0122] (3.1) In order to filter the sensitive information related to the items, a discriminator
[0123] is designed to counter the recommender, the discriminator infers the bias of the item based on the item representation, the true bias of the item is determined by its attributes, and the bias score of the item is calculated as follows:
[0124]
[0125] wherein, is the set of attributes considered for the item, is the set of all categories that the sensitive attribute of the item has, is the set of categories with the sensitive attribute “ ” bias, the threshold is determined according to the distribution of the item attributes in the data set, and the score falls into any one of the intervals , according to the range of the interval to which the item belongs, the true sensitive attribute bias of the item is divided ;
[0126] (3.2) The discriminator in this part is composed of one fully connected layer and one output layer, and the network is represented as:
[0127]
[0128] wherein, is the predicted sensitive attribute bias of the item i, and the discriminator loss Through the cross-entropy function calculation, the formula is:
[0129]
[0130] (4) Combine user ratings with item information to filter sensitive information from the user-item side. Specifically, the following sub-steps are included:
[0131] (4.1) In addition to the user representation directly reflecting the user attribute characteristics, the user's rating of the item and the item rated by the user also reveals the user's sensitive information, so a discriminator is introduced, which is against the recommender and aims to remove the user's sensitive information from the user and item ratings; the discriminator infers the user's sensitive attributes based on the user's ratings of the items and the item representation; wherein the rating information includes the real rating and the predicted rating of the item, and the item representation includes the single item representation and the fused representation of the item ;
[0132] The discriminator is composed of a fully connected layer for rating input, a fully connected layer for item input, and an output layer, represented as:
[0133]
[0134] wherein is the inferred result of the user's sensitive information; the calculation of the item representation includes the following sub-steps: (4.1.1) The calculation formula of the single item representation
[0135] is as follows:
[0136]
[0137] wherein, is the weight of the item to the user ; the rating directly reflects the user's preference for the item, and the user's favorite item will determine the user's preference to a greater extent, and the item with higher rating will have a greater impact on the user's preference than the item with lower rating, therefore, the rating is used as the weight here:
[0138]
[0139] (4.1.2) The calculation formula of the fused representation of the item is as follows:
[0140]
[0141] wherein is the user the number of items scored, is the item to the user ; the score directly reflects the user's preference for the item, the item that the user likes will determine the user's preference to a greater extent, and the item with a higher score will have a greater impact on the user's preference than the item with a lower score, so the score is used as the weight here:
[0142]
[0143] (4.2) the discriminator loss is calculated by the cross-entropy function, and the formula is:
[0144]
[0145] wherein is a set of sensitive features, is the value of the feature of the user , and is the predicted value of the feature of the user .
[0146] (5) the recommendation part and the adversarial part of the model are trained and updated simultaneously in a multi-task learning manner. Specifically, the following sub-steps are included:
[0147] (5.1) in order to comprehensively consider the fairness of multiple aspects and the removal of sensitive information, the total loss of the adversarial part is described as follows:
[0148]
[0149] wherein , and are hyperparameters for flexible control of the loss function;
[0150] (5.2) the meta-learning recommendation system is implemented on the meta-learning recommendation system framework, and the meta-model is updated through a series of tasks, so that the output model will adapt to the fine-tuning of new user tasks faster; the meta-learning recommendation framework based on MAML will train a meta-model through multiple user tasks to output the initialization parameters of the user model; the framework updates the gradient in two steps, namely inner loop and outer loop; in the inner loop, the goal is to train multiple user models, and the loss is calculated according to the support set of the user task and the user model is updated; in the outer loop, the goal is to train the meta-model that outputs the initialization parameters of the user model, and the loss of all tasks on the respective query set in the inner loop is aggregated to update the model;
[0151] The unit of training data and test data in meta-learning is a task, and a task includes a support set and a query set, the support set is used for updating the task model, and the query set is used for testing the task model and updating the meta-model; in the inner loop, the recommendation part does not consider the update of the cheat discriminator, and meanwhile, the first embedding part of the user and the item is not updated; in the outer loop part, the meta-model is updated; the recommendation part of the model is represented by , the adversarial part of the model is represented by , the parameters of the two parts of the model are represented by , wherein is the parameter of the recommendation part, is the parameter of the adversarial part; the objective function of the model is represented as
[0152]
[0153] , wherein , the parameters involved in the loss include and .
[0154] Further, the application also provides a sensitive attribute filtering fairness recommendation device based on double-sided adversarial learning, which comprises at least one processor and a memory, the at least one processor and the memory are connected through a data bus, the memory stores instructions executable by the at least one processor, and the instructions are used to complete the sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning after being executed by the processor.
[0155] We conduct experiments on three widely used public datasets: ML-1M, BookCrossing and ML-100K. Among them, ML-1M and ML-100K come from Movielens Collection, and the details of the three datasets are shown in Table 1.
[0156] Table 1 Dataset statistics
[0157]
[0158] Table 2 shows the performance of all baseline models and our proposed model on the ML-1M, BookCrossing and ML-100K datasets. The best results under each evaluation metric are bolded. Overall, our method outperforms the state-of-the-art algorithms in all performance metrics on the three datasets. Compared with the traditional recommendation algorithms that do not consider fairness, our method achieves better results in fairness while also performing well in recommendation performance. This is likely due to our fairness-aware recommendation method that considers sensitive information, making the recommendation more dependent on user preferences rather than sensitive information. Compared with other fairness modules, our method achieves better results in fairness by considering the potential relationship between item and user sensitive information in the filtering process. In particular, on the CF metric, our method has an order of magnitude improvement, which means it almost meets the requirements of counterfactual fairness. Among the baseline models, CLOVER and MACR perform the best. CLOVER generates a fair representation from the user perspective, and MACR introduces module detection and bias removal information during the learning process. However, both methods ignore the residual sensitive information on the item and user-item sides, leading to unsatisfactory fairness performance. In terms of recommendation performance, our method is the best on most datasets. This indicates that considering bidirectional filtering is a better approach that can eliminate sensitive information that may lead to biased and unreasonable recommendations.
[0159] Table 2 Comparison of the proposed method and the existing technology in recommendation effect and fairness effect
[0160]
[0161] To evaluate the impact of different modules in our proposed algorithm, we conduct ablation experiments on three datasets. Table 3 shows the test results considering user-side rating normalization, user-item side item representation fusion, item-side sensitive information filtering, and our proposed final algorithm, respectively. From the results, we observe that when considering user-side rating normalization, CF has an order of magnitude improvement on three datasets, indicating that user-side rating normalization helps to achieve counterfactual fairness. When considering user-item side item representation fusion, GF performs better on BookCrossing and ML-100K than other algorithms without item fusion, meaning that this component is effective for group fairness. When considering item-side sensitive information filtering, the performance of AUC, CF, and GF is improved comprehensively on three datasets, indicating that our filtering from the item side performs very well for overall recommendation fairness. When all modules are applied, the overall performance is best. In addition to improving fairness, our final algorithm also generally achieves better recommendation accuracy. However, when all modules are applied simultaneously, CF and GF are sometimes worse than when each module is used alone. We suspect that this is because counterfactual fairness and group fairness are somewhat mutually restrictive. For example, in the movie recommendation scenario, we want to ensure that the recommendation result remains unchanged even if the user's gender is changed through counterfactual fairness. This means that the movies recommended by the model should not be affected by gender. On the other hand, for group fairness, we want the recommendations for men and women to be the same. However, in reality, men and women have different preferences for movies, so in order to achieve group fairness as much as possible, we must consider the gender of the user. In this case, counterfactual fairness may be affected.
[0162] Table 3 Results of ablation experiments
[0163]
[0164] To evaluate the impact of hyperparameters on the model and the efficiency of item-side sensitive information filtering, we conduct algorithm experiments on three datasets using different parameters The results are shown in the following figures: Figure 4 , Fig. Figure 5 , and Fig. Figure 6 , respectively, where Figure 4 is the line chart of the impact of hyperparameter changes on the model on the ML-100K dataset; Figure 5 is the line chart of the impact of hyperparameter changes on the model on the BookCrossing dataset; Figure 6 is the line chart of the impact of hyperparameter changes on the model on the ML-1M dataset. In the test The other parameters are fixed. With the increase of , MAE and NDCG only have slight fluctuations. This is because the item side cannot provide additional information to mine user preferences. However, AUC, CF and GF generally first decrease and then increase with the increase of . To balance the accuracy and fairness of recommendations, ML-1M dataset performs best when , while BookCrossing and ML-100K datasets perform best when . This shows that the item side sensitive information with greater impact can play a more important role in solving the fairness problem in recommendations.
[0165] It is readily understood by those skilled in the art that the above description is only preferred embodiments of the present application, and is not intended to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning, characterized in that, Comprise the following steps: (1) According to the user, the item information and the interaction relationship between them, determine the recommendation part model, use the classical recommendation algorithm to predict the user's rating of the item; (2) According to the user characteristics and the item rating, design the user side of the adversarial learning network, filter sensitive information from the user side; The step (2) specifically includes the following substeps: (2.1) To filter sensitive information from user representations, design a discriminator counter to the recommender; the discriminator infer sensitive information about the user based on the user representation; Because the ratings reflect the preferences of the users, the actual ratings of the users for the items are used as external information to assist in the prediction; And the scores are normalized; The discriminator (2.2) The discriminator loss The cross-entropy function is calculated by the formula: wherein is a set of sensitive features, is a user s feature value, is a predicted value of a user s feature . (3) According to the statistical information of the sensitive feature relationship between the existing data set of users and items, establish the potential association of user and item sensitive information, filter sensitive information from the item side; The step (3) specifically includes the following substeps: (3.1) To filter sensitive information related to items, design a discriminator. In contrast to recommenders, discriminators Inferring item bias based on item representation, where the true bias of an item is determined by its attributes, and calculating item bias... Bias score as follows: wherein, is a set of attributes of the considered item, is an item of sensitive attributes has a set of all categories, is a set of categories where the item has a sensitive attribute ” bias, the threshold is determined according to the own distribution of item attributes in the dataset , the score falls in any of the intervals , the real sensitive attribute bias of the item is divided according to the range of the belonging interval. (3.2) the discriminator where, is the predicted sensitive attribute bias of item i, and the discriminator loss is computed by the cross-entropy function, with the formula: (4) Combine the user rating and item information to filter sensitive information from the user-item side; (5) Use multi-task learning to train and update the recommendation part and the adversarial part of the model at the same time.
2. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 1, wherein, The step (1) specifically includes the following substeps: (1.1) According to the characteristic information of the user and the article, the user embedding and the article embedding are obtained through the embedding layer and the full connection layer; set The user set is represented as The article set is represented as; The user embedding and the article embedding are generated through the embedding layer and the full connection layer , as shown below: in, Representing users respectively and items The number of attributes, User Attribute classification of One-hot vector of dimension, It is an item Category content of One-hot vector of dimension, , User and item attributes The embedding matrix, , and , These are parameters used in the fully connected layer for users and items; (1.2) After the user embedding and the item embedding are connected in series, a decision layer and an output layer composed of N layers of fully connected neural network are used to obtain the prediction result, and the network is represented as: wherein, and are the weight matrix and bias vector of the th decision layer, and are the weight matrix and bias vector of the output layer; and denote the activation functions of the decision layers and the output layer, respectively; is the predicted rating of the user for the item . (1.3) For the user , the recommendation part constitutes the loss of recommendation calculated by the cross-entropy function, expressed as: wherein, is the set of items rated by user u, is the set of users is the true rating of item by user 3. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 1, wherein, The calculation formula of the normalized score in step (2.1) is as follows: When the highest rating given by the user is At that time, the user For items Normalized score Defined as: wherein, is a user rating for an item , is a user rating for an item is a user rating for an item .
4. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 1, wherein, The step (4) specifically includes the following substeps: (4.1) In addition to the user representation directly reflecting the user attribute characteristics, the user's rating of the item and the item rated by the user also reveals the user's sensitive information, so a discriminator is introduced , which is opposite to the recommender, aims to remove the user's sensitive information from the user's and item's ratings; the discriminator infers the user's sensitive attributes based on the user's ratings of the items and the item representation; wherein the rating information includes the real rating and the predicted rating of the item, and the item representation includes the single item representation , the fused representation of the item ; discriminator consists of a fully connected layer for rating input, a fully connected layer for item input, and an output layer, denoted as: wherein is a user s sensitive information inference result; (4.2) The discriminator loss The cross-entropy function is calculated by the formula: wherein is a set of sensitive features, is a user feature value, is a predicted value of a feature of a user 5. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 4, wherein, The individual items in step (4.1) represent The calculation formula is as follows: wherein, is an item to a user weight; the score directly reflects the user's preference for the item, the item that the user likes will determine the user's preference to a greater extent, and the item with a higher score will have a greater impact on the user's preference than the item with a lower score, so the score is used as the weight here: 。 6. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 4, wherein, The item fusion in step (4.1) means The calculation formula is as follows: wherein is a user the number of items rated by the user, is an item to the user the weight; the rating directly reflects the user's preference for the item, the item that the user likes will determine the user's preference to a greater extent, the item with higher rating will have greater impact on the user's preference than the item with lower rating, therefore the rating is used as the weight here: 。 7. The sensitive attribute filtering fairness recommendation method based on bilateral adversarial learning according to claim 1, wherein, The step (5) specifically includes the following substeps: (5.1) To comprehensively consider fairness in various aspects and removal of sensitive information, total loss of the adversarial part Is described as follows: wherein , and are hyperparameters for flexible control of the loss function; (5.2) Implement the meta-learning recommendation system on the meta-learning recommendation system framework, update the meta model through a series of tasks, so that the output model will adapt to the fine-tuning of new user tasks faster; The meta-learning recommendation framework based on MAML will train a meta model through multiple user tasks to output the initialization parameters of the user model; The framework updates the gradient in two steps, namely inner loop and outer loop; In the inner loop, the model of multiple users is trained as the target, the loss is calculated according to the support set of the user task, and the user model is updated; In the outer loop, the meta model for training the initialization parameters of the output user model is taken as the target, and the loss of all tasks in the respective query set in the inner loop is aggregated to update the model; The unit of training data and test data in meta-learning is a task, and a task includes a support set and a query set. The support set is used for updating the task model, and the query set is used for testing the task model and updating the meta-model gradient. In the inner loop, the recommendation part will not consider the update of the cheating discriminator, and at the same time, the first embedding part of the user and the item is not updated. In the outer loop part, the meta-model will be updated as a whole. The recommendation part of the model is represented by , the anti-part of the model is represented by , and the parameters of the two parts of the model are represented by , wherein is the parameter of the recommendation part, is the parameter of the anti-part; and the objective function of the model is represented as: wherein, The parameters involved in the loss are represented by and .
8. A sensitive attribute filtering fairness recommendation device based on double-sided adversarial learning, characterized in that: It comprises at least one processor and a memory, the at least one processor and the memory are connected through a data bus, the memory stores instructions executable by the at least one processor, and the instructions are used to complete the sensitive attribute filtering fairness recommendation method based on double-sided adversarial learning in any one of claims 1-7 after being executed by the processor.