Fair personalized recommendation method and device based on mutual information decoupling and storage medium
By constructing biased, hybrid, and unbiased embedding networks and optimizing the embedding vectors of users and products using the mutual information decoupling method, the contradiction between fairness and accuracy in collaborative filtering recommendation models is resolved, achieving fair recommendation while improving recommendation accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2023-01-10
- Publication Date
- 2026-04-28
AI Technical Summary
Existing collaborative filtering recommendation models ignore the impact of non-sensitive information when considering fairness, which leads to a significant decrease in recommendation accuracy and is prone to producing unfair recommendation results.
By constructing biased embedding networks, hybrid embedding networks, and unbiased embedding networks, and utilizing mutual information decoupling, the embedding vectors of users and products are optimized to eliminate sensitive information and improve the capture of non-sensitive information. Gradient descent is used to train the network to minimize the loss function, achieving a balance between fairness and accuracy.
While ensuring the fairness of the recommendations, the accuracy of the recommendations was improved, and a significant drop in the accuracy of the recommendations was prevented, thus achieving the dual goal of fairness and accuracy.
Smart Images

Figure CN116010718B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of recommendation, specifically to a fair personalized recommendation method, electronic device, and storage medium based on mutual information decoupling. Background Technology
[0002] Machine learning algorithms have permeated all aspects of our lives. As one of the most common applications of machine learning, recommender systems are having a crucial impact on human society, with more and more people using them for information and decision-making. Collaborative filtering models, as one of the mainstream recommender technologies, provide personalized product recommendations by mining users' historical records. However, collaborative filtering models are data-driven and susceptible to unfair recommendation results due to data or algorithmic biases.
[0003] At the decision-making level, "fairness" means not being based on any inherent or acquired biases of any person or group. Therefore, an unfair recommendation system is one that favors a particular group. For example, in a career recommendation system, male users might be recommended more high-paying jobs, while female users might be recommended more low-paying jobs, even if they have the same qualifications.
[0004] Existing collaborative filtering recommendation models aimed at fairness mostly consider only the impact of sensitive information on recommendation fairness, while ignoring the impact of non-sensitive information in user and product representations on recommendation accuracy and fairness. Although these methods achieve fairness to some extent, they lead to a significant decrease in recommendation accuracy. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a fair personalized recommendation method, device, and storage medium based on mutual information decoupling. The aim is to eliminate sensitive information in user and product embedding vectors while encouraging the model to capture non-sensitive information from interaction data. This approach alleviates recommendation unfairness while maintaining recommendation accuracy and ensuring the quality of recommended content.
[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0007] The present invention provides a fair personalized recommendation method based on mutual information decoupling, characterized by the following steps:
[0008] Step 1: Construct the raw data, including: a user rating matrix for the product and a user sensitivity attribute matrix.
[0009] Suppose there are M users and N products. Let U denote the user set, and U = {u1, ..., u2}. m ,...,u M}, where u mLet m represent the m-th user, 1 ≤ m ≤ M; let V represent the product set, and V = {v1, ..., v2} n ,...,v N}, where v n This represents the nth product, where 1 ≤ n ≤ N;
[0010] Let r mn Represents the m-th user u m For the nth product v n Is there any interaction, if the m-th user u m For the nth product v n If there is interaction, then let r mn =1, otherwise let r mn =0, thus obtaining the user interaction matrix for the product, denoted as R = {r mn} M×N ;
[0011] Let the user-sensitive attribute matrix S = {s1,...,s} m ,...,s M}, where s m This represents the sensitive attribute value of the m-th user;
[0012] Step 2: Construct a biased embedding network, including: a biased one-hot encoding layer, a sensitive information encoder, and a sensitive attribute prediction layer, used to learn the biased embedding of users and products, and obtain the predicted value of the sensitive attributes of the m-th user.
[0013] Step 3: Calculate the loss function L of the biased embedding network according to equation (1). a (θ a ):
[0014]
[0015] In equation (1), θ a =[P,Q,W a ] represents the parameter to be learned;
[0016] Step 4: Train the biased embedding network using gradient descent and minimize the loss function L. a (θ a This process continues until the loss function converges, thus obtaining the trained biased embedding network and its corresponding optimal parameters. Among them, P * The optimal biased embedding matrix for a user, Q * This represents the optimal biased embedding matrix of the product. The parameter represents the optimal inference sensitivity attribute;
[0017] Step 5: Construct a hybrid embedding network, including: a hybrid one-hot encoder layer, a hybrid information encoder, and a preference prediction layer, used to learn the hybrid embedding of users and products, and obtain the m-th user u. m For the nth product v n Predicted preference score
[0018] Step 6: Calculate the loss function L according to equation (2). r (θ r ):
[0019]
[0020] In equation (2), θ r =[W,Z] are the parameters to be optimized, D m ={(i,j)|i∈R m ,j∈VR m} is the m-th user u m The training data, (i,j) represents the relationship between u and u. m The i-th product v with interaction i and with u m The j-th product v without interaction i The resulting product pair; Represents the m-th user u m For the i-th product v i Predicted preference score Represents the m-th user u m For the j-th product v j The predicted preference score, λ is the regularization coefficient, and ||·|| represents the L2 norm;
[0021] Step 7: Train the hybrid embedding network using gradient descent and minimize the loss function L. r (θ r This process continues until the loss function converges, thus obtaining the trained hybrid embedding network and its corresponding optimal parameters. Among them, W * Z represents the optimal hybrid embedding matrix of the user. * This represents the optimal hybrid embedding matrix of the product;
[0022] Step 8: Construct an unbiased embedding network, including: an unbiased one-hot coding layer, a mutual information lower bound optimization layer, and a mutual information upper bound optimization layer, used to learn the unbiased embeddings of users and products, and to obtain the user-side mutual information lower bound. Lower bound of mutual information between the product side Upper bound of user-side mutual information Upper bound of mutual information with product side
[0023] Step 9: Calculate the loss function L(φ1) on the user side and the loss function L(φ2) on the product side according to equations (3) and (4) respectively:
[0024]
[0025]
[0026] In equations (3) and (4), φ1 and φ2 are the parameters to be optimized;
[0027] Step 10: Train the unbiased embedding learning network using gradient descent, and in each iteration of training, first minimize the loss function L shown in equation (5). h (θ h To update parameter θ h = [E, F], then minimize the loss function L shown in equation (6). φ (φ) is used to update the parameters φ = [φ1, φ2] until the loss function L is reached. h (θ h The process continues until convergence is achieved, thus obtaining the trained unbiased embedding network and its corresponding optimal parameters.
[0028]
[0029] L φ (φ)=L(φ1)+L(φ2))(6)
[0030] In equation (5), γ corresponds to the hyperparameter controlling the lower bound of the mutual information between the user and the product, and β corresponds to the hyperparameter controlling the upper bound of the mutual information between the user and the product.
[0031] Step 11: Obtain the user rating matrix of the product that meets the fairness requirements using equation (7).
[0032]
[0033] The fair personalized recommendation method based on mutual information decoupling described in this invention is also characterized in that step 2 includes:
[0034] Step 2.1: The biased one-hot coding layer maps the user set U and the product set V to the biased embedding space, respectively, thereby obtaining the biased embedding matrix P = [p1,...,p...] of the user. m ...,p M The biased embedding matrix of the product is Q = [q1,...,q]. n ...,q N ], where p m Represents the m-th user u m Biased embedding vector; qn v represents the nth product n Biased embedding vector;
[0035] Step 2.2: Construct a sensitive information encoder, including: K graph convolutional layers, where the current graph convolutional layer is k;
[0036] The biased embedding matrix P of the user and the biased embedding matrix Q of the product are input into the sensitive information encoder, and the m-th user u output after passing through the k-th graph convolutional layer is calculated using equation (8). m Biased embedding vector With the nth product v n Biased embedding vector
[0037]
[0038] In equation (8), R m Indicates the relationship with the m-th user u m A collection of interactive products, T n Indicates the relationship with the nth product v n An interactive set of users This represents the output of the (k-1)th graph convolutional layer for the m-th user u. m Biased embedding vectors, This represents the nth product v output by the (k-1)th graph convolutional layer. n The biased embedding vector, when k=1, let make |R m | indicates the connection with the m-th user u m The number of interactive product collections, |T n | indicates the relationship with the nth product v n The number of user groups that interact;
[0039] Step 2.3: The sensitive attribute prediction layer uses equation (9) to calculate the m-th user u. m The predicted value of the sensitive attribute obtained after K graph convolutional layers
[0040]
[0041] In equation (9), W a The parameter represents the inferred sensitive attribute; This represents the output of the m-th user u from the k-th graph convolutional layer. m The biased embedding vector; σ(·) denotes the Sigmoid activation function.
[0042] Step 5 includes:
[0043] Step 5.1: The hybrid one-hot coding layer maps the user set U and the product set V to the hybrid embedding space, respectively, thereby obtaining the user's hybrid embedding matrix W = [w1,...,w...]. m ...,w M The hybrid embedding matrix of the product z = [z1,...,z] n ...,z N ], where w m Represents the m-th user u m The hybrid embedding vector; z n v represents the nth product n ;
[0044] Step 5.2: Construct a hybrid information encoder, which includes: K graph convolutional layers, where the current graph convolutional layer is k;
[0045] Step 5.3: Input the user's hybrid embedding matrix W and the product's hybrid embedding matrix Z into the hybrid information encoder, and use Equation (10) to calculate the m-th user u output after passing through the k-th graph convolutional layer. m Hybrid embedding vector With the nth product v n Hybrid embedding vector
[0046]
[0047] In equation (10), This represents the output of the (k-1)th graph convolutional layer for the m-th user u. m The hybrid embedding vector, This represents the nth product v output by the (k-1)th graph convolutional layer. n The mixed embedding vector, when k=1, is initialized.
[0048] Step 5.4: The preference prediction layer uses equation (11) to calculate the m-th user u. m For the nth product v n Predicted preference score
[0049]
[0050] In equation (11), <·, ·> denote the inner product. This represents the output of the m-th user u from the k-th graph convolutional layer. m The hybrid embedding vector, This represents the nth product v output by the Kth graph convolutional layer. n The hybrid embedding vector.
[0051] Step 8 includes:
[0052] Step 8.1: The unbiased one-hot coding layer maps the user set U and the product set V to the unbiased embedding space, thereby obtaining the user's unbiased embedding matrix E = [e1,...,e2]. m ...,e M The unbiased embedding matrix F = [f1,...,f] of the product. n ...,f N ], where e m Represents the m-th user u m The unbiased embedding vector; f n v represents the nth product n The unbiased embedding vector;
[0053] Step 8.2: The mutual information lower bound optimization layer calculates the user-side mutual information lower bound using equations (12) and (13) respectively. Lower bound of mutual information between the product side
[0054]
[0055]
[0056] In equations (12) and (13), Represents the m-th user u m The optimal hybrid embedding vector, Represents the m-th user u m The optimal biased embedding vector; v represents the nth product n The optimal hybrid embedding vector, v represents the nth product n The optimal biased embedding vector; e j Indicates from Randomly sample from the set to obtain the j-th user u j The unbiased embedding vector; This represents the optimal biased embedding matrix P from the user. * In the process, randomly select the j-th user u j The biased embedding vector, f j Indicates from The j-th product v is obtained by randomly sampling from the set. j The unbiased embedding vector; This represents the optimal biased embedding matrix Q of the product. * In the process, randomly select the j-th product v j The biased embedding vector is given by π(·,·) representing the Pearson correlation coefficient; g(·,·,·) is a fractional function, and we have:
[0057]
[0058]
[0059] In equations (14) and (15), sim(·) is the cosine similarity and α is the hyperparameter controlling the weight coefficient.
[0060] Step 8.3: The mutual information upper bound layer calculates the user-side mutual information upper bound using equations (16) and (17) respectively. Upper bound of mutual information with product side
[0061]
[0062]
[0063] In equations (16) and (17), q φ1 (·|·) represents a Gaussian distribution with parameters φ1 on the user side. The parameter on the product side is a Gaussian distribution with a value of φ2.
[0064] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing any of the aforementioned fair personalized recommendation methods based on mutual information decoupling, and the processor is configured to execute the program stored in the memory.
[0065] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of any of the aforementioned fair personalized recommendation methods based on mutual information decoupling.
[0066] Compared with existing technologies, the beneficial effects of this invention are reflected in:
[0067] This invention addresses the recommendation unfairness caused by sensitive information by proposing a dual constraint based on mutual information. It optimizes user and product embeddings using upper and lower bounds of mutual information to eliminate sensitive information in the embedding vectors and enhance non-sensitive information. Existing techniques only consider the impact of sensitive information, which, while ensuring recommendation fairness to some extent, leads to a significant decrease in recommendation accuracy. Therefore, this invention constructs a mutual information-based debiasing framework, proposing an optimization method that maximizes the lower bound of mutual information and minimizes the upper bound of mutual information to achieve the dual constraint objective. This improves the fairness of any collaborative filtering model based on embedding vectors while preventing a significant drop in recommendation accuracy. Attached Figure Description
[0068] Figure 1This is a flowchart of a fair personalized recommendation method based on mutual information decoupling according to the present invention. Detailed Implementation
[0069] In this embodiment, a fair personalized recommendation method based on mutual information decoupling constrains the embedding vectors of users and products through upper and lower bounds of mutual information. This aims to maximize the content of non-sensitive information while avoiding sensitive information. Figure 1 As shown. Its characteristic is that it is performed according to the following steps:
[0070] Step 1: Construct the raw data, including: user interaction matrix with the product, user sensitivity attribute matrix.
[0071] Suppose there are M users and N products. Let U denote the user set, and U = {u1, ..., u2}. m ,...,u M}, where u m Let m represent the m-th user, 1 ≤ m ≤ M; let V represent the product set, and V = {v1, ..., v2} n ,...,v N}, where v n This represents the nth product, where 1 ≤ n ≤ N;
[0072] Let r mn Represents the m-th user u m For the nth product v n Is there any interaction, if the m-th user u m For the nth product v n If there is interaction, then let r mn =1, otherwise let r mn =0, thus obtaining the user interaction matrix for the product, denoted as R = {r mn} M×N ;
[0073] Let the user-sensitive attribute matrix S = {s1,...,s} m ,...,s M}, where s m This represents the sensitive attribute value of the m-th user. In this embodiment, training and testing are performed on the public dataset MovieLens-1M, which includes user interaction matrices with products and user gender characteristics. 70% of each user's interaction records with products in the MovieLens-1M dataset are used for training, and the remaining 30% are used for testing. A user sensitive attribute matrix S is constructed using the user's gender characteristics, where gender characteristics include "male" and "female," with 0 representing "male" and 1 representing "female." The user sensitive attribute matrix is then represented as a binary matrix, as shown below. Figure 1The "User Sensitive Attribute Matrix" is shown in the figure.
[0074] Step 2: Construct a biased embedding network, including: a biased one-hot encoding layer, a sensitive information encoder, and a sensitive attribute prediction layer, used to learn the biased embeddings of users and products.
[0075] Step 2.1: The biased one-hot coding layer maps the user set U and the product set V to the biased embedding space, thereby obtaining the biased embedding matrix P = [p1,...,p...] of the user. m ...,p M The biased embedding matrix of the product is Q = [q1,...,q]. n ...,q N ], where p m Represents the m-th user u m Biased embedding vector; q n v represents the nth product n The biased embedding vector is set to 64 for each user and product.
[0076] Step 2.2: Construct a sensitive information encoder, including: K graph convolutional layers. Let the current graph convolutional layer be k. Through the graph convolutional layers, model the interaction relationship between users and products. K is set to 3.
[0077] The biased embedding matrix P of the user and the biased embedding matrix Q of the product are input into the sensitive information encoder, and the m-th user u output after passing through the k-th graph convolutional layer is calculated using equation (1). m Biased embedding vector With the nth product v n Biased embedding vector
[0078]
[0079] In equation (1), R m Indicates the relationship with the m-th user u m A collection of interactive products, T n Indicates the relationship with the nth product v n An interactive set of users This represents the output of the (k-1)th graph convolutional layer for the m-th user u. m Biased embedding vectors, This represents the nth product v output by the (k-1)th graph convolutional layer. n The biased embedding vector, when k=1, let make |R m | indicates the connection with the m-th user u m The number of interactive product collections, |T n| indicates the relationship with the nth product v n The number of user groups that interact;
[0080] Step 2.3: The sensitive attribute prediction layer uses equation (2) to calculate the m-th user u. m The predicted value of the sensitive attribute obtained after K graph convolutional layers
[0081]
[0082] In equation (2), W a The parameter represents the inferred sensitive attribute; This represents the output of the m-th user u from the k-th graph convolutional layer. m The biased embedding vector; σ(·) represents the Sigmoid activation function;
[0083] Step 2.4: Calculate the loss function L of the biased embedding network according to equation (3). a (θ a ):
[0084]
[0085] In equation (3), θ a =[P,Q,W a ] represents the parameter to be learned;
[0086] Step 2.5: Train the biased embedding network using gradient descent and minimize the loss function L. a (θ a This process continues until the loss function converges, thus obtaining the trained biased embedding network and its corresponding optimal parameters. Among them, P * The optimal biased embedding matrix for a user, Q * This represents the optimal biased embedding matrix of the product. The parameters represent the optimal inference of sensitive attributes. In this embodiment, the constructed biased embedding network learns and obtains the user's optimal biased embedding matrix P through the sensitive attribute prediction task. * The optimal biased embedding matrix Q of the product * At this time, P * and Q * Contains only sensitive information.
[0087] Step 3: Construct a hybrid embedding network, including: a hybrid one-hot encoder layer, a hybrid information encoder, and a preference prediction layer, used to learn the hybrid embedding of users and products.
[0088] Step 3.1: The hybrid one-hot coding layer maps the user set U and the product set V to the hybrid embedding space, thereby obtaining the user's hybrid embedding matrix W = [w1,...,w...]. m ...,w M The hybrid embedding matrix of the product z = [z1,...,z] n ...,z N ], where w m Represents the m-th user u m The hybrid embedding vector; z n v represents the nth product n The hybrid embedding vector is set to a length of 64 for each user and product.
[0089] Step 3.2: Construct a hybrid information encoder, which includes: K graph convolutional layers, where the current graph convolutional layer is k;
[0090] Step 3.3: Input the user's hybrid embedding matrix W and the product's hybrid embedding matrix Z into the hybrid information encoder, and use equation (4) to calculate the m-th user u output after passing through the k-th graph convolutional layer. m Hybrid embedding vector With the nth product v n Hybrid embedding vector
[0091]
[0092] In equation (4), This represents the output of the (k-1)th graph convolutional layer for the m-th user u. m The hybrid embedding vector, This represents the nth product v output by the (k-1)th graph convolutional layer. n The mixed embedding vector, when k=1, is initialized.
[0093] Step 3.4: The preference prediction layer uses equation (5) to calculate the m-th user u. m For the nth product v n Predicted preference score
[0094]
[0095] In equation (5), <·, ·> denote the inner product. This represents the output of the m-th user u from the k-th graph convolutional layer. m The hybrid embedding vector, This represents the nth product v output by the Kth graph convolutional layer. n ;
[0096] Step 3.5: Calculate the loss function L according to equation (6). r (θ r ):
[0097]
[0098] In equation (6), θ r =[W,Z] are the parameters to be optimized, D m ={(i,j)|i∈R m ,j∈VR m} is the m-th user u m The training data, (i,j) represents the relationship between u and u. m The i-th product v with interaction i and with u m The j-th product v without interaction i The resulting product pair; Represents the m-th user u m For the i-th product v i Predicted preference score Represents the m-th user u m For the j-th product v j The predicted preference score, λ is the regularization coefficient, set to 0.001, and ||·|| represents the L2 norm;
[0099] Step 3.6: Train the hybrid embedding network using gradient descent and minimize the loss function L. r (θ r This process continues until the loss function converges, thus obtaining the trained hybrid embedding network and its corresponding optimal parameters. Among them, W * Z represents the optimal hybrid embedding matrix of the user. * The optimal hybrid embedding matrix represents the product; in this embodiment, the optimal hybrid embedding matrix W of the user is learned through the constructed hybrid embedding network. * The optimal hybrid embedding matrix Z of the product * W at this time * and Z * It contains both sensitive and non-sensitive information.
[0100] Step 4: Construct an unbiased embedding network, including: an unbiased one-hot coding layer, a mutual information lower bound optimization layer, and a mutual information upper bound optimization layer, used to learn the unbiased embeddings of users and products.
[0101] Step 4.1: The unbiased one-hot coding layer maps the user set U and the product set V to the unbiased embedding space, thereby obtaining the user's unbiased embedding matrix E = [e1,...,e2]. m ...,eM The unbiased embedding matrix F = [f1,...,f] of the product. n ...,f N ], where e m Represents the m-th user u m The unbiased embedding vector; f n v represents the nth product n The unbiased embedding vector is set to 64 for each user and product.
[0102] Step 4.2: The mutual information lower bound optimization layer uses equations (7) and (8) to calculate the user-side mutual information lower bound respectively. Lower bound of mutual information between the product side
[0103]
[0104]
[0105] In equations (7) and (8), Represents the m-th user u m The optimal hybrid embedding vector, Represents the m-th user u m The optimal biased embedding vector; v represents the nth product n The optimal hybrid embedding vector, v represents the nth product n The optimal biased embedding vector; e j Indicates from Randomly sample from the set to obtain the j-th user u j The unbiased embedding vector; This represents the optimal biased embedding matrix P from the user. * In the process, randomly select the j-th user u j The biased embedding vector, f j Indicates from The j-th product v is obtained by randomly sampling from the set. j The unbiased embedding vector; This represents the optimal biased embedding matrix Q of the product. * In the process, randomly select the j-th product v j The biased embedding vector is given by π(·,·) representing the Pearson correlation coefficient; g(·,·,·) is a fractional function, and we have:
[0106]
[0107]
[0108] In equations (7) and (8), sim(·) represents cosine similarity, and α is a hyperparameter controlling the weight coefficient, set to 0.1. In this embodiment, by optimizing the lower bound of mutual information between the user side and the product side, the aim is to ensure that the user's unbiased embedding matrix E and the product's unbiased embedding matrix F can be derived from the user's optimal hybrid embedding matrix W. * The optimal hybrid embedding matrix Z of the product * In the process, the optimal biased embedding matrix P of the user is captured. * The optimal biased embedding matrix Q of the product * Irrelevant information, i.e., non-sensitive information.
[0109] Step 4.4: The upper bound of mutual information is calculated using equations (11) and (12) respectively. Upper bound of mutual information with product side
[0110]
[0111]
[0112] In equations (11) and (12), This represents a conditional Gaussian distribution with parameter φ1 on the user side. The parameter on the product side is a conditional Gaussian distribution with a value of φ2. In this embodiment, by optimizing the upper bound of the mutual information between the user side and the product side, the aim is to ensure that the user's unbiased embedding matrix E and the product's unbiased embedding matrix F are mutually exclusive with the user's optimal biased embedding matrix P. * The optimal biased embedding matrix Q of the product * Related information, i.e., sensitive information.
[0113] Step 4.5: Calculate the loss function L(φ1) on the user side and the loss function L(φ2) on the product side according to equations (13) and (14) respectively:
[0114]
[0115]
[0116] In equations (13) and (14), φ1 and φ2 are the parameters to be optimized;
[0117] Step 4.6: Train the unbiased embedding learning network using gradient descent, and in each iteration of training, first minimize the loss function L shown in equation (15). h (θ h To update parameter θ h = [E, F], and then minimize the loss function L shown in equation (16). φ(φ) is used to update the parameters φ = [φ1, φ2] until the loss function L is reached. h (θ h The process continues until convergence is achieved, thus obtaining the trained unbiased embedding network and its corresponding optimal parameters.
[0118]
[0119] L φ (φ)=L(φ1)+L(φ2) (16)
[0120] In equation (15), γ corresponds to the hyperparameter controlling the lower bound of the mutual information between the user and the product, and β corresponds to the hyperparameter controlling the upper bound of the mutual information between the user and the product; both γ and β are set to 0.1.
[0121] Step 4.7: Obtain the user rating matrix for the product that meets the fairness requirements using equation (17).
[0122]
[0123] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described product fairness recommendation method, and the processor is configured to execute the program stored in the memory.
[0124] In this embodiment, a computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the product fairness recommendation method described above.
[0125] Example:
[0126] To verify the effectiveness of this method, this invention uses two publicly available datasets commonly used in the field of fairness in recommender systems: Movielens-1M and LastFM-360K. This invention employs the widely used NDCG and RECALL as evaluation metrics for recommendation accuracy; a higher value indicates better recommendation accuracy. Simultaneously, it defines fairness metrics applicable to TopK product recommendations: DP@K and EO@K, based on the Demographic Parity principle and the Equal Opportunity principle; a lower value indicates a fairer recommendation result.
[0127] Table 1. Recommendations for accuracy and fairness of the proposed method and comparative method on MovieLens-1M.
[0128]
[0129]
[0130] Table 2. Recommended accuracy and fairness of the method of the present invention and the comparative method on LastFM-360K.
[0131]
[0132] As shown in Tables 1 and 2, compared with other fairness methods, this invention achieves the best results in balancing recommendation accuracy and fairness on the MovieLens-1M and LastFM-360K public datasets; the experimental results fully verify the effectiveness of this invention in improving recommendation fairness.
Claims
1. A fair personalized recommendation method based on mutual information decoupling, characterized in that, The procedure is as follows: Step 1: Construct the raw data, including: a user rating matrix for the product and a user sensitivity attribute matrix. Assume there is individual users and One product, making Represents a user set, and ,in, Indicates the first One user, ;make Represents a product set, and ,in, Indicates the first One product ; make Indicates the first individual users For the Product Is there any interaction, if the first individual users For the Product If there is interaction, then let Otherwise Thus, the user interaction matrix of the product is obtained, denoted as... ; User-sensitive attribute matrix ,in, Indicates the first Sensitive attribute values for each user; Step 2: Construct a biased embedding network, including: a biased one-hot encoding layer, a sensitive information encoder, and a sensitive attribute prediction layer, used to learn the biased embeddings of users and products, and obtain the first... Predicted values of sensitive attributes for each user ; Step 2.1: The biased one-hot coding layer will set the user set With product collection These are mapped to the biased embedding space respectively, thus obtaining the user's biased embedding matrix. The biased embedding matrix of the product ,in, Indicates the first individual users Biased embedding vector; Indicates the first Product Biased embedding vector; Step 2.2: Construct a sensitive information encoder, including: There are several graph convolutional layers, let the current graph convolutional layer be... ; Biased embedding matrix of users Biased embedding matrix of products Input the sensitive information into the encoder, and use equation (8) to calculate the result after the first... The output of the first graph convolutional layer individual users Biased embedding vector With the Product Biased embedding vector ; (8) In equation (8), Indicates the relationship with the first individual users A collection of interactive products Indicates the relationship with the first Product An interactive set of users Indicates the first The output of the first graph convolutional layer is the first... individual users Biased embedding vectors, Indicates the first The output of the first graph convolutional layer is the first... Product The biased embedding vector, when ,make ,make ; Indicates the relationship with the first individual users The number of interactive product collections Indicates the relationship with the first Product The number of user groups that interact; Step 2.3: The sensitive attribute prediction layer uses equation (9) to calculate the first... individual users go through The predicted value of sensitive attributes obtained after the convolutional layer of the graph ; (9) In equation (9), The parameter represents the inferred sensitive attribute; Indicates the first The output of the first graph convolutional layer is the first... individual users Biased embedding vector; This represents the Sigmoid activation function; Step 3: Calculate the loss function of the biased embedding network according to equation (1). : (1) In equation (1), These are the parameters to be learned; Step 4: Train the biased embedding network using gradient descent and minimize the loss function. This continues until the loss function converges, thus obtaining the trained biased embedding network and its corresponding optimal parameters. ;in, This represents the optimal biased embedding matrix for a user. This represents the optimal biased embedding matrix of the product. The parameter represents the optimal inference sensitivity attribute; Step 5: Construct a hybrid embedding network, including: a hybrid one-hot encoder layer, a hybrid information encoder, and a preference prediction layer, used to learn the hybrid embedding of users and products, and obtain the first... individual users For the Product Predicted preference score ; Step 6: Calculate the loss function according to equation (2). : (2) In equation (2), These are parameters to be optimized. It is the first individual users The training data, Representative and Interactive Product and with The first without interaction Product The resulting product pair; Indicates the first individual users For the Product Predicted preference score Indicates the first individual users For the Product Predicted preference score It is the regularization coefficient. Represents the L2 norm; Step 7: Train the hybrid embedding network using gradient descent and minimize the loss function. This continues until the loss function converges, thus obtaining the trained hybrid embedding network and its corresponding optimal parameters. ,in, The optimal hybrid embedding matrix represents the user. This represents the optimal hybrid embedding matrix of the product; Step 8: Construct an unbiased embedding network, including: an unbiased one-hot coding layer, a mutual information lower bound optimization layer, and a mutual information upper bound optimization layer, used to learn the unbiased embeddings of users and products, and to obtain the user-side mutual information lower bound. Lower bound of mutual information between the product side Upper bound of user-side mutual information Upper bound of mutual information with product side ; Step 9: Calculate the loss function for optimizing the user side according to equations (3) and (4) respectively. Loss function on the product side : (3) (4) In equations (3) and (4), and These are the parameters to be optimized. Step 10: Train the unbiased embedding learning network using gradient descent, and in each iteration of training, first minimize the loss function shown in equation (5). To update parameters Then minimize the loss function shown in equation (6). To update parameters until the loss function The process continues until convergence is achieved, thus obtaining the trained unbiased embedding network and its corresponding optimal parameters. ; (5) (6) In equation (5), The hyperparameters that control the lower bound of the mutual information between the user and the product. The hyperparameters that control the upper bound of the mutual information between users and products; Step 11: Obtain the user rating matrix of the product that meets the fairness requirements using equation (7). : (7)。 2. The fair personalized recommendation method based on mutual information decoupling according to claim 1, characterized in that, Step 5 includes: Step 5.1: The hybrid one-hot coding layer will set the user set With product collection These are mapped to the hybrid embedding space respectively, thus obtaining the user's hybrid embedding matrix. Hybrid Embedded Matrix of Products ,in, Indicates the first individual users ; Indicates the first Product ; Step 5.2: Construct a hybrid information encoder, including: There are several graph convolutional layers, let the current graph convolutional layer be... ; Step 5.3: Assemble the user's hybrid embedding matrix. Hybrid Embedded Matrix of Products The input is fed into the hybrid information encoder, and the result after the first step is calculated using equation (10). The output of the first graph convolutional layer individual users Hybrid embedding vector With the Product Hybrid embedding vector ; (10) In equation (10), Indicates the first The output of the first graph convolutional layer is the first... individual users Hybrid embedding vectors, Indicates the first The output of the first graph convolutional layer is the first... Product The hybrid embedding vector, when ,initialization , ; Step 5.4: The preference prediction layer uses equation (11) to calculate the first... individual users For the Product Predicted preference score ; (11) In equation (11), Indicates the inner product. Indicates the first The output of the first graph convolutional layer is the first... individual users The hybrid embedding vector, Indicates the first The output of the first graph convolutional layer is the first... Product The hybrid embedding vector.
3. The fair personalized recommendation method based on mutual information decoupling according to claim 2, characterized in that, Step 8 includes: Step 8.1: The unbiased one-hot coding layer will set the user set With product collection These are mapped to the unbiased embedding space to obtain the user's unbiased embedding matrix. And the unbiased embedding matrix of the product ,in, Indicates the first individual users The unbiased embedding vector; Indicates the first Product The unbiased embedding vector; Step 8.2: The mutual information lower bound optimization layer calculates the user-side mutual information lower bound using equations (12) and (13) respectively. Lower bound of mutual information between the product side ; (12) (13) In equations (12) and (13), Indicates the first individual users The optimal hybrid embedding vector, Indicates the first individual users The optimal biased embedding vector; Indicates the first Product The optimal hybrid embedding vector, Indicates the first Product The optimal biased embedding vector; Indicates from Random sampling from the set, the resulting number individual users The unbiased embedding vector; This represents the optimal biased embedding matrix from the user. In the middle, randomly select the first individual users Biased embedding vectors, Indicates from Random sampling from the set, the resulting number Product The unbiased embedding vector; This represents the optimal biased embedding matrix of the product. In the middle, randomly select the first Product Biased embedding vectors, This represents the Pearson correlation coefficient; Let be a fractional function, and we have: (14) (15) In equations (14) and (15), It is cosine similarity. Hyperparameters for controlling the weighting coefficients; Step 8.3: The mutual information upper bound optimization layer calculates the user-side mutual information upper bound using equations (16) and (17) respectively. Upper bound of mutual information with product side ; (16) (17) In equations (16) and (17), The parameters on the user side are: Gaussian distribution, The parameters on the product side are: The Gaussian distribution.
4. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store programs that support the processor in executing the fair personalized recommendation method based on mutual information decoupling as described in any of claims 1-3, wherein the processor is configured to execute the programs stored in the memory.
5. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it performs the steps of the fair personalized recommendation method based on mutual information decoupling as described in any one of claims 1-3.
Citation Information
Patent Citations
Recommendation method based on deep social relationship
CN108320187A
Tag-based heterogeneous graph recommendation algorithm
CN113987338A