A fairness-aware social recommendation method and related device

By constructing a heterogeneous social network and performing feature debias processing, a fair social recommendation is achieved using a heterogeneous graph neural network, solving the problem of discrimination against specific groups in the existing technology, and improving the fairness and accuracy of the recommendation results.

CN118747247BActive Publication Date: 2025-03-25NANJING FORESTRY UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411003914.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2025-03-25
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Existing social recommendation technologies have discrimination against specific social groups, resulting in unfair recommendation results.

Method used

By constructing a heterogeneous social network, extracting node features and performing debias processing, the debiased final features are obtained by using a heterogeneous graph neural network to achieve fair social recommendations.

Benefits of technology

It effectively reduces discrimination against specific social groups by recommendation decisions, achieves fair recommendations for heterogeneous social networks, and improves the fairness and accuracy of recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747247B_ABST
    Figure CN118747247B_ABST
Patent Text Reader

Abstract

The present invention discloses a fairness-aware social recommendation method and related devices. The present invention constructs a heterogeneous social network based on node interaction data in the social network, debiases user node features and structural semantic features containing sensitive attributes in the heterogeneous social network, and performs debiased feature splicing. A graph neural network is used to obtain the debiased final features of all nodes, thereby determining the recommended items for each user node, achieving fair recommendations for heterogeneous social networks, and effectively solving the recommendation discrimination problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a fairness-aware social recommendation method and related devices, belonging to the technical field of social recommendation. Background Art

[0002] With the rapid development of modern information technology, social networks have become an important part of the modern information society. How to effectively extract and utilize key information in social network data has become an important goal to enhance the value of social network data and promote the efficient development of the information society. Social recommendation is an important task in the field of network data analysis. It aims to explore the potential interactive relationships between individuals in social networks and has broad application prospects in various scenarios such as product promotion, career recommendation, and social cooperation.

[0003] Recent studies have shown that social network data may contain statistical bias or social historical bias against certain disadvantaged groups during the collection process, and this bias will be captured and amplified by the network model, leading to unfair recommendation results. Specifically, on the one hand, the network feature learning method based on random walks may introduce statistical bias in network data, making the learned node features highly correlated with node sensitive attributes such as age and gender, resulting in biased recommendation results for specific groups by the recommendation algorithm; on the other hand, for the currently widely used graph neural network feature learning model, the message passing mechanism based on the graph structure will further amplify the statistical bias in the training data, leading to discrimination against specific groups. Therefore, for the problem of fair social recommendation, how to reduce the discrimination of recommendation decisions against specific social groups on the basis of achieving accurate recommendations is a key issue that needs to be solved urgently. Summary of the invention

[0004] The present invention provides a fairness-aware social recommendation method and related devices, which solve the problems disclosed in the background technology.

[0005] According to one aspect of the present disclosure, a fairness-aware social recommendation method is provided, comprising:

[0006] Obtain node data and node interaction data in a social network; wherein nodes include user nodes and item nodes;

[0007] According to the node data and node interaction data in the social network, a recommendation model is adopted to obtain the final features of all nodes after debiasing; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted according to the node interaction data and the node data, the first user node features in the heterogeneous social network are debiased according to the user node features in the node features and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased according to the preset meta-path, the debiased first user node features and the remaining node features are respectively spliced ​​with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes, and according to the preliminary debiased features of all nodes, a heterogeneous graph neural network is adopted to obtain the final features of all nodes after debiasing; wherein, the first user node is a user node with sensitive attributes;

[0008] According to the final features after debiasing of all nodes, the similarity method is used to obtain the recommended items for each user node.

[0009] In some embodiments of the present disclosure, debiasing a first user node feature in a heterogeneous social network according to the user node feature in the node feature and the user node data in the node data includes:

[0010] Extracting the first user node according to the user node data in the node data, grouping the first user nodes according to the sensitive attribute values, and calculating the average feature deviation between the groups;

[0011] The first user node feature is projected to a direction orthogonal to the average feature deviation to obtain the debiased first user node feature.

[0012] In some embodiments of the present disclosure, debiasing structural semantic features in heterogeneous social networks according to preset meta-paths includes:

[0013] According to the preset meta-path, a balanced meta-path sampling method is used to perform structural semantic sampling on the heterogeneous social network to obtain a sampling sequence; wherein, in the sampling sequence, the sensitive attribute values ​​of the nodes closest to the first user are different;

[0014] According to the sampling sequence, the heterogeneous Skip-Gram model is used to obtain the debiased structural semantic features.

[0015] In some embodiments of the present disclosure, based on the features of all nodes after preliminary debiasing, a heterogeneous graph neural network is used to obtain the final features of all nodes after debiasing, including:

[0016] The linear transformation method is used to map the initially debiased features of different types of nodes into a uniform dimensional vector space;

[0017] For each pair of adjacent nodes in the heterogeneous social network, the feature self-attention value between the adjacent nodes is calculated based on the mapped features;

[0018] The features of adjacent nodes are transferred and aggregated according to the feature self-attention values ​​to obtain the final debiased features of all nodes.

[0019] In some embodiments of the present disclosure, the feature self-attention value between adjacent nodes is expressed as:

[0020] ;

[0021] In the formula, e uv is the feature self-attention value between adjacent nodes, d is the scaling factor, and h v(c) is the central node feature in the information aggregation process, h u(t) It is the context node feature in the information aggregation process.

[0022] In some embodiments of the present disclosure, the heterogeneous graph neural network is pre-trained, and the loss function during training includes a multi-party loss term L based on the Wasserstein distance WD , Individual fairness loss term L ind and the recommendation performance loss L of node features util ;

[0023] ;

[0024] ;

[0025] ;

[0026] Where A is the node type set, is the distribution of node features of type T with sensitive attributes of 0 in space, is the distribution of node features of type T with sensitive attribute 1 in space, express and Wasserstein distance between i , h j ) is h i and h j The cosine similarity of i and h j The nodes v i and v j The feature vector of , Θ[i,j] is the i-th row and j-th column in Θ, Θ is the cosine similarity matrix of the original features of the node, Based on h i and h jScore the recommended results, y ij For node v i and v j The interaction label between them, L is any recommendation performance loss;

[0027] During each round of training, the coefficients of each loss term are updated according to the convergence speed; the formula is:

[0028] λ1=exp(w util ) / (exp(w util )+exp(w wd )+exp(w ind ));

[0029] λ2=exp(w wd ) / (exp(w util )+exp(w wd ) +exp(w ind ));

[0030] λ3=exp(w ind ) / (exp(w util )+exp(w wd )+exp(w ind ));

[0031] Where λ1, λ2 and λ3 are L util , L WD and L ind The coefficient, w util 、w wd and w ind L util , L WD and L ind The convergence speed.

[0032] In some embodiments of the present disclosure, based on the final features of all nodes after debiasing, a similarity method is used to obtain recommended items for each user node, including:

[0033] For user node A1, obtain the item node set B1 that has no direct interaction with user node A1 from the heterogeneous social network;

[0034] Calculate the similarity between the final feature of user node A1 and the final feature of each item node in item node set B1, and select the K items with the highest similarity as the recommended items for user node A1.

[0035] According to another aspect of the present disclosure, a fairness-aware social recommendation device is provided, comprising:

[0036] An acquisition module is used to acquire node data and node interaction data in a social network; wherein nodes include user nodes and item nodes;

[0037] A debiasing module, based on the node data and node interaction data in the social network, adopts a recommendation model to obtain the final debiased features of all nodes; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted based on the node interaction data and the node data, the first user node feature in the heterogeneous social network is debiased based on the user node feature in the node feature and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased based on the preset meta-path, the debiased first user node feature and the remaining node features are respectively spliced ​​with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes, and a heterogeneous graph neural network is adopted based on the preliminary debiased features of all nodes to obtain the final debiased features of all nodes; wherein, the first user node is a user node with sensitive attributes;

[0038] The recommendation module uses the similarity method based on the final features of all nodes after debiasing to obtain the recommended items for each user node.

[0039] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform a fairness-aware social recommendation method.

[0040] According to another aspect of the present disclosure, a computer device is provided, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a fairness-aware social recommendation method.

[0041] The beneficial effects achieved by the present invention are as follows: the present invention constructs a heterogeneous social network based on the node interaction data in the social network, debiases the user node features and structural semantic features containing sensitive attributes in the heterogeneous social network, performs debiased feature splicing, and adopts a graph neural network to obtain the final debiased features of all nodes, thereby determining the recommended items for each user node, achieving fair recommendations for heterogeneous social networks, and effectively solving the problem of recommendation discrimination. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Flowchart of the method for fairness-aware social recommendation;

[0043] Figure 2 This is the preprocessing flowchart in the recommendation model;

[0044] Figure 3 Flowchart for training heterogeneous graph neural networks;

[0045] Figure 4 Block diagram of a fairness-aware social recommender apparatus. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is obvious that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0047] Unless otherwise specified, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0048] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0049] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0050] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0051] It should be noted that similar symbols and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.

[0052] In order to solve the problem of discrimination in existing social recommendations, the present disclosure proposes a fairness-aware social recommendation method and related devices, specifically, to achieve fair recommendations for heterogeneous social networks through debiased feature learning.

[0053] Figure 1 is a schematic diagram of an embodiment of the fairness-aware social recommendation method disclosed in the present invention, Figure 1 Embodiments of may be executed by a social network server.

[0054] like Figure 1 As shown, step 1 of the embodiment is to obtain node data and node interaction data in a social network; wherein the nodes include user nodes and item nodes.

[0055] It should be noted that the data of user nodes may include the user's gender, age, region, occupation, interests, etc., the data of item nodes may include item name, category, attributes, etc., the node interaction data may include interaction data between user nodes, and interaction data between user nodes and item nodes, the interaction data between user nodes may include social relationships between users, such as friend relationship data, and the interaction data between user nodes and item nodes may include user behavior data such as browsing, clicking, purchasing, and rating of items.

[0056] return Figure 1 In step 2 of the embodiment, a recommendation model is used to obtain the debiased final features of all nodes according to the node data and the node interaction data in the social network; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted according to the node interaction data and the node data, the first user node features in the heterogeneous social network are debiased according to the user node features in the node features and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased according to the preset meta-path, the debiased first user node features and the remaining node features are respectively concatenated with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes, and a heterogeneous graph neural network is used according to the preliminary debiased features of all nodes to obtain the final debiased features of all nodes; wherein the first user node is a user node containing sensitive attributes.

[0057] It should be noted that after obtaining the data in step 1, the data can be cleaned and screened, such as removing incomplete data, so as to obtain a clean node set, node data, and node interaction data.

[0058] The data processing of the recommendation model is roughly divided into two steps. One step is preprocessing, and the other step is processing using a graph neural network. Debiasing is performed through these two steps, that is, removing bias from all node features.

[0059] See Figure 2 , the preprocessing process can be as follows:

[0060] 11) Based on the node interaction data and node data, construct heterogeneous social networks and extract node features in heterogeneous social networks.

[0061] It should be noted that based on the node interaction data, social network links are established between user nodes and user nodes, and between user nodes and item nodes, so as to construct a heterogeneous social network.

[0062] Node features can be defined as vectors composed of node data. Specifically, for user nodes and item nodes, public information data is obtained from their original node data to form a vector set of fixed length. For nodes of the same type, each dimension of their features corresponds to the same meaning.

[0063] 12) Debiasing a first user node feature in a heterogeneous social network according to the user node feature in the node feature and the user node data in the node data; wherein the first user node is a user node containing sensitive attributes.

[0064] It should be noted that, in some embodiments, orthogonal projection is used to perform debiasing, and the specific process may be as follows:

[0065] 121) According to the user node data in the node data, extract the first user node, group the first user nodes according to the sensitive attribute values, and calculate the average feature deviation between the groups.

[0066] It should be noted that sensitive attributes can be defined as features of user node characteristics that should not be used in the decision-making process. Using these attributes to make decisions may lead to discrimination or unfair treatment of specific user groups, including but not limited to: gender, race, age, religious beliefs, etc. The general sensitive attribute value can be defined as S u ∈{0,1}, then the first user node can be divided into two groups, one with a value of 0 and the other with a value of 1. The average features of each group are calculated and recorded as X0 and X1 respectively. The average feature deviation X can be calculated based on X0 and X1. bias =(X0-X1) / || X0-X1||; where || || is the Euclidean norm of the vector.

[0067] 122) Projecting the first user node feature to a direction orthogonal to the average feature deviation to obtain the debiased first user node feature.

[0068] It should be noted that for each first user node, feature X i Project to the direction orthogonal to the feature deviation to obtain the debiased feature X o =X i - <X i , X bias >X bias ;in, <X i , X bias > is the vector X i With X bias The inner product of .

[0069] It should be noted that the debiasing here is to remove the distribution bias directly related to the sensitive attributes in the original node features, which can alleviate the impact of the distribution bias of the sensitive attributes of the first user node features on the fairness of subsequent feature learning.

[0070] 13) Debiasing structural semantic features in heterogeneous social networks based on preset meta-paths.

[0071] It should be noted that, in some embodiments, the process of debiasing structural semantic features may be as follows:

[0072] 131) According to the preset meta-path, a balanced meta-path sampling method is used to perform structural semantic sampling on heterogeneous social networks to obtain a sampling sequence; wherein in the sampling sequence, the sensitive attribute values ​​of the nodes closest to the first user are different.

[0073] It should be noted that during the sampling process, for the first user node v in the sampling sequence S , with a probability greater than 0.5, the next first user node with a different sensitive attribute S from the current first user node is collected, while extracting semantic information and avoiding sampling bias caused by the centralized distribution of user sensitive attributes.

[0074] 132) According to the sampling sequence, a heterogeneous Skip-Gram model is used to obtain the debiased structural semantic features.

[0075] It should be noted that the heterogeneous Skip-Gram model is used to pre-train the node features of the sampling results using a shallow neural network to maximize the similarity of the features of adjacent sampling nodes in the sampling sequence, and obtain the debiased structural semantic feature X f .

[0076] It should be noted that the debiasing here refers to removing the sampling bias introduced by the network structure during the extraction of structural semantic features. This can alleviate the problem of uneven distribution of sensitive attributes in the random walk sampling results, thereby improving the fairness of the distribution of sensitive attributes in the structural semantic features learned based on the heterogeneous Skip-Gram model.

[0077] 14) The debiased first user node features and the remaining node features (i.e., the original features of the nodes that do not need to be debiased) are concatenated with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes.

[0078] Specifically, the debiased node features of the first user are concatenated with the debiased structural semantic features of the first user to obtain the preliminary debiased features of the first user; the initial features of all nodes except the first user are concatenated with the debiased structural semantic features of the corresponding nodes to obtain the preliminary debiased features of all nodes except the first user; in this way, debiasing can be performed from two perspectives, node feature data and network structure sampling data, on the basis of retaining the original features of the nodes and the structural semantic features of the nodes, thereby alleviating the distribution bias of sensitive attributes in the node features and improving the fairness of the learning results of the graph neural network model.

[0079] It should be noted that heterogeneous graph neural networks need to be pre-trained. The input node features can be linearly transformed through a linear layer. According to the transformed node features, the normalized feature self-attention coefficient between adjacent nodes is calculated. The adjacent node features are transferred and aggregated according to the feature self-attention coefficient. According to the aggregated node features, the Wasserstein distance between the features of different sensitive attribute groups is calculated. The multi-party feature space distribution optimization loss is calculated based on the Wasserstein distance. The individual fairness loss is calculated based on the debiased feature similarity. The recommendation performance loss is calculated based on the node feature similarity. The network fairness and recommendation performance loss item weights are calculated through the dynamic weight update method. The network is adaptively optimized and the network parameters and node features are updated.

[0080] See Figure 3 , the training process of heterogeneous graph neural network is as follows:

[0081] S1) linearly transforms the input node features through a linear neural network layer, mapping the features of different types of nodes to a uniform dimensional vector space; specifically, for a node v of type T, multiply its features by the type-related weight matrix W T , get the transformed node feature h v .

[0082] S2) For each pair of adjacent nodes in the heterogeneous social network, the corresponding feature self-attention coefficient is calculated; specifically, for each node v, the central node feature h in the information aggregation process is obtained by multiplying it by different linear transformation weight matrices v(c) With the context node feature h v(t) , for the information aggregation center node and the adjacent context nodes, by v(c) With h u(t) Multiply and divide by the scaling factor d to calculate the feature self-attention value between nodes ; for e uv , normalized by the Softmax function, and the normalized feature self-attention coefficient α is obtained uv .

[0083] It should be noted that information aggregation is a method for graph neural networks to update node features, which can be seen as the aggregation of features of adjacent nodes to the central node. Because each node updates its own features through information aggregation, each node can be a central node or a context node, depending on the direction of the current information aggregation. In the feature aggregation process, each node uses two feature vectors to distinguish the attention values ​​in different directions during the information aggregation process. The central node feature comes from the weighted aggregation of the features of the context nodes.

[0084] It should be noted that h is used here. v(c) 、h u(t) The feature self-attention value is calculated by using d, which has lower complexity than the traditional self-attention value calculation method based on Key, Query, and Value feature vectors, and can distinguish the information aggregation processes in different directions between the same node pairs, thus achieving efficient and reasonable self-attention value calculation.

[0085] S3) Transfer and aggregate the features of adjacent nodes according to the feature self-attention coefficient; specifically, for the central node v, α uv Multiply the feature of its corresponding adjacent context node, and then add the multiplied vectors of all adjacent nodes.

[0086] The above steps aggregate information for a single type of context node. Since there are multiple types of context nodes in heterogeneous social networks, in order to extract the differences between different relationship types in the aggregation process, the aggregation result is multiplied by the relationship type mapping matrix W r , and sum up the information of all adjacent nodes, and finally activate the output through the nonlinear transformation function σ to obtain the aggregated central node feature vector h v(agg) , that is, h v(agg) = σ(Σ r Σ u α uv W r h u(t) ), where Σ r Indicates the sum of the calculation results for different relationship types r, Σ u It means to sum the calculation results of all context nodes u for a given node v.

[0087] S4) Calculate the Wasserstein distance between different sensitive attribute group features based on the aggregated node features;

[0088] The specific formula can be expressed as:

[0089] ;

[0090] In the formula, is the distribution of node features of type T with sensitive attributes of 0 in space, is the distribution of node features of type T with sensitive attribute 1 in space, express and The Wasserstein distance between them, inf represents the infimum, is the joint probability distribution set of node features, π represents the joint probability distribution of all possible node features, h i and h j The nodes v i and v j The eigenvector of d is the feature space of dimension d, π(h i ,h j ) represents node h i 、h j The joint probability distribution of Indicates h i and h j The square root of the Euclidean distance between them.

[0091] S5) Considering the multi-party feature space distribution deviation caused by multiple interest groups in heterogeneous social networks, for the node type set A, the multi-party feature space loss term based on Wasserstein distance is calculated. .

[0092] S6) Considering the imbalance of fairness among individuals that may be caused by group fairness optimization in heterogeneous social networks, based on the Lipschitz constraint, the individual fairness loss term is calculated based on the cosine similarity matrix Θ of the original node features (i.e., features without debiasing) and the cosine similarity (Cosine) of the final node features after debiasing of the heterogeneous graph neural network output. ; where Θ[i, j] represents the i-th row and j-th column of Θ, i.e., node v i 、v j The cosine similarity value of the original feature, Cosine(h i , h j ) is h i and h j The cosine similarity of .

[0093] S7) Considering the loss of the recommendation task, the performance loss term of the recommendation task is calculated based on the final node features after the heterogeneous graph neural network output is debiased ; In the formula, Based on h i and h j Score the recommended results, y ij For node v i and v jThe interaction label between them, if there is interaction y ij =1, otherwise 0, L is any recommendation performance loss, such as Bayesian Personalized Ranking (BPR) loss.

[0094] S7) The weights of network fairness and recommendation performance loss items are calculated through a dynamic weight update method. Specifically, the multi-party loss item based on Wasserstein distance, the individual fairness loss item, and the recommendation performance loss item of node characteristics are calculated dynamically. The convergence speed of the three loss items is calculated, and the loss item system is updated in each round of training to finally obtain the total loss of the model.

[0095] It should be noted that the multi-party loss term L WD Make the feature distribution space distance of the first user groups with different sensitive attributes (eg male and female groups) as small as possible, that is, it is difficult to distinguish different sensitive attribute groups from the feature distribution, and improve the fairness of feature distribution groups; individual fairness loss term L ind Make the learned node features as satisfying as possible: nodes with similar original features should have similar node features after aggregation, so as to improve the individual fairness of the learned features; recommend performance loss L util Aiming at the performance loss of the recommendation task, the recommendation based on the learned node features is made as accurate as possible.

[0096] During each round of training, the coefficients of each loss term are updated according to the convergence speed. The specific formula can be:

[0097] λ1=exp(w util ) / (exp(w util )+exp(w wd )+exp(w ind ));

[0098] λ2=exp(w wd ) / (exp(w util )+exp(w wd ) +exp(w ind ));

[0099] λ3=exp(w ind ) / (exp(w util )+exp(w wd )+exp(w ind ));

[0100] Where λ1, λ2 and λ3 are L util , L WD and L ind The coefficient of util 、w wd and wind L util , L WD and L ind The convergence speed of

[0101] The total loss can be expressed as:

[0102] L=λ1L util +λ2L WD +λ3L ind .

[0103] During the model training process, based on the convergence speed of different loss items, the loss coefficients are adaptively calculated to achieve a dynamic balance between the group fairness, individual fairness and recommendation performance of the recommendation results. Compared with the method of setting a fixed loss coefficient and manually adjusting the parameters, this method can improve the efficiency and effectiveness of model training.

[0104] S8) Based on the calculated total loss L, the network is adaptively optimized, and steps S2 to S7 are repeated to update network parameters and node features.

[0105] It should be noted that when the above network is used, it only includes steps S1 to S3, which can be specifically: using linear transformation to map the features of different types of nodes to a uniform dimensional vector space; for each pair of adjacent nodes in the heterogeneous social network, according to the mapped features, calculating the feature self-attention value between the adjacent nodes, that is, ; According to the feature self-attention value, the features of adjacent nodes are transferred and aggregated to obtain the final debiased features of all nodes.

[0106] It should be noted that the use of heterogeneous graph neural networks can effectively improve the fairness of social recommendations through feature fairness distance optimization.

[0107] return Figure 1 ,Step 3 of the embodiment, based on the final features after debiasing of all nodes, a similarity method is used to obtain recommended items for each user node.

[0108] It should be noted that the similarity method is specifically used to calculate the similarity scores between nodes, specifically the similarity scores between user nodes and item nodes, so that the similarity scores determine the items to be recommended. The detailed process can be as follows:

[0109] 31) For user node A1, obtain the item node set B1 that has no direct interaction with user node A1 from the heterogeneous social network.

[0110] 32) Calculate the similarity between the final feature of user node A1 and the final feature of each item node in item node set B1, and select the K items with the highest similarity as the recommended items for user node A1.

[0111] It should be noted that if there are N item nodes in the item node set B1, then N similarity scores can be calculated, and the K item nodes with the highest scores are selected, and the items corresponding to the item nodes are recorded as recommended items; where K is set according to actual conditions, such as setting K=3.

[0112] The above method constructs a heterogeneous social network based on the node interaction data in the social network, debiasing the user node features and structural semantic features containing sensitive attributes in the heterogeneous social network, and concatenating the debiased features. The graph neural network is used to obtain the final debiased features of all nodes, thereby determining the recommended items for each user node, achieving fair recommendations for heterogeneous social networks, and effectively solving the problem of recommendation discrimination.

[0113] Figure 3 is a schematic diagram of an embodiment of the fairness-aware social recommendation device disclosed in the present invention, Figure 3 The embodiment of the invention is a virtual device that can be loaded and executed by a social network server, including an acquisition module, a debiasing module and a recommendation module.

[0114] The acquisition module of the embodiment is configured to acquire node data and node interaction data in a social network; wherein the nodes include user nodes and item nodes.

[0115] The debiasing module of the embodiment is configured to obtain the final features of all nodes after debiasing by using a recommendation model based on node data and node interaction data in a social network; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted based on the node interaction data and the node data, the first user node features in the heterogeneous social network are debiased based on the user node features in the node features and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased based on a preset meta-path, the debiased first user node features are concatenated with the corresponding debiased structural semantic features to obtain new features of the first user node, and a heterogeneous graph neural network is used based on the new features of the first user node and the remaining node features in the heterogeneous social network to obtain the final features of all nodes after debiasing; wherein the first user node is a user node containing sensitive attributes.

[0116] The recommendation module of the embodiment is configured to obtain the recommended items for each user node using a similarity method based on the final features of all nodes after debiasing.

[0117] Similar to the above method, this device constructs a heterogeneous social network based on the node interaction data in the social network, debiasing the user node features and structural semantic features containing sensitive attributes in the heterogeneous social network, and concatenating the debiased features. It uses a graph neural network to obtain the final debiased features of all nodes, thereby determining the recommended items for each user node, achieving fair recommendations for heterogeneous social networks, and effectively solving the problem of recommendation discrimination.

[0118] Based on the same technical solution, the present disclosure also relates to a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device performs a fairness-aware social recommendation method.

[0119] Based on the same technical solution, the present disclosure also relates to a computer device, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a fairness-aware social recommendation method.

[0120] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0121] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0122] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0124] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A fairness-aware social recommendation method, characterized in that: include: Obtain node data and node interaction data in a social network; wherein nodes include user nodes and item nodes; According to the node data and node interaction data in the social network, a recommendation model is adopted to obtain the final features of all nodes after debiasing; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted according to the node interaction data and the node data, the first user node features in the heterogeneous social network are debiased according to the user node features in the node features and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased according to the preset meta-path, the debiased first user node features and the remaining node features are respectively spliced ​​with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes, and according to the preliminary debiased features of all nodes, a heterogeneous graph neural network is adopted to obtain the final features of all nodes after debiasing; wherein, the first user node is a user node with sensitive attributes; Based on the final features of all nodes after debiasing, the similarity method is used to obtain the recommended items for each user node; The heterogeneous graph neural network is pre-trained, and the loss function during training includes a multi-party loss term L based on the Wasserstein distance. WD , Individual fairness loss term L ind and the recommended performance loss term L util ; Where A is the node type set, is the distribution of node features of type T with sensitive attributes of 0 in space, is the distribution of node features of type T with sensitive attribute 1 in space, express and Wasserstein distance between i ,h j ) is h i and h j The cosine similarity of i and h j The nodes v i and v j , Θ[i,j] is the i-th row and j-th column in Θ, Θ is the cosine similarity matrix of the original features of the node, φ(hi,hj) is the result score of the recommendation based on hi and hj, yij is the score of the node v i and v j The interaction label between them, L is any recommendation performance loss; During each round of training, the coefficients of each loss term are updated according to the convergence speed; the formula is: λ1=exp(w util ) / (exp(w util )+exp(w wd )+exp(w ind )); λ2=exp(w wd ) / (exp(w util )+exp(w wd )+exp(w ind )); λ3=exp(w ind ) / (exp(w util )+exp(w wd )+exp(w ind )); Where λ1, λ2 and λ3 are L util , L WD and L ind The coefficient of util 、w wd and w ind L util , L WD and L ind The convergence speed.

2. The fairness-aware social recommendation method according to claim 1, characterized in that: According to the user node feature in the node feature and the user node data in the node data, the first user node feature in the heterogeneous social network is debiased, including: Extracting the first user node according to the user node data in the node data, grouping the first user nodes according to the sensitive attribute values, and calculating the average feature deviation between the groups; The first user node feature is projected to a direction orthogonal to the average feature deviation to obtain the debiased first user node feature.

3. The fairness-aware social recommendation method according to claim 1, characterized in that: Debiasing structural semantic features in heterogeneous social networks based on preset meta-paths, including: According to the preset meta-path, a balanced meta-path sampling method is used to perform structural semantic sampling on the heterogeneous social network to obtain a sampling sequence; wherein, in the sampling sequence, the sensitive attribute values ​​of the nodes closest to the first user are different; According to the sampling sequence, the heterogeneous Skip-Gram model is used to obtain the debiased structural semantic features.

4. The fairness-aware social recommendation method according to claim 1, characterized in that: Based on the initial debiased features of all nodes, a heterogeneous graph neural network is used to obtain the final debiased features of all nodes, including: The linear transformation method is used to map the initially debiased features of different types of nodes into a uniform dimensional vector space; For each pair of adjacent nodes in the heterogeneous social network, the feature self-attention value between the adjacent nodes is calculated based on the mapped features; The features of adjacent nodes are transferred and aggregated according to the feature self-attention values ​​to obtain the final debiased features of all nodes.

5. The fairness-aware social recommendation method according to claim 4, characterized in that: The feature self-attention value between adjacent nodes is: In the formula, e uv is the feature self-attention value between adjacent nodes, d is the scaling factor, and h v(c) is the central node feature in the information aggregation process, h u(t) It is the context node feature in the information aggregation process.

6. The fairness-aware social recommendation method according to claim 1, characterized in that: According to the final features after debiasing of all nodes, the similarity method is used to obtain the recommended items for each user node, including: For user node A1, obtain the item node set B1 that has no direct interaction with user node A1 from the heterogeneous social network; Calculate the similarity between the final feature of user node A1 and the final feature of each item node in item node set B1, and select the K items with the highest similarity as the recommended items for user node A1.

7. A fairness-aware social recommendation device, characterized in that: include: An acquisition module is used to acquire node data and node interaction data in a social network; wherein nodes include user nodes and item nodes; A debiasing module, based on the node data and node interaction data in the social network, adopts a recommendation model to obtain the final debiased features of all nodes; wherein, in the recommendation model, a heterogeneous social network is constructed and node features in the heterogeneous social network are extracted based on the node interaction data and the node data, the first user node feature in the heterogeneous social network is debiased based on the user node feature in the node feature and the user node data in the node data, the structural semantic features in the heterogeneous social network are debiased based on the preset meta-path, the debiased first user node feature and the remaining node features are respectively spliced ​​with the corresponding debiased structural semantic features to obtain the preliminary debiased features of all nodes, and a heterogeneous graph neural network is adopted based on the preliminary debiased features of all nodes to obtain the final debiased features of all nodes; wherein, the first user node is a user node with sensitive attributes; The recommendation module uses the similarity method to obtain the recommended items for each user node based on the final features of all nodes after debiasing; The heterogeneous graph neural network is pre-trained, and the loss function during training includes a multi-party loss term L based on the Wasserstein distance. WD , Individual fairness loss term L ind and the recommended performance loss term L util ; Where A is the node type set, is the distribution of node features of type T with sensitive attributes of 0 in space, is the distribution of node features of type T with sensitive attribute 1 in space, express and Wasserstein distance between i ,h j ) is h i and h j The cosine similarity of i and h j The nodes v i and v j , Θ[i,j] is the i-th row and j-th column in Θ, Θ is the cosine similarity matrix of the original features of the node, φ(hi,hj) is the result score of the recommendation based on hi and hj, yij is the score of the node v i and v j The interaction label between them, L is any recommendation performance loss; During each round of training, the coefficients of each loss term are updated according to the convergence speed; the formula is: λ1=exp(w util ) / (exp(w util )+exp(w wd )+exp(w ind )); λ2=exp(w wd ) / (exp(w util )+exp(w wd )+exp(w ind )); λ3=exp(w ind ) / (exp(w util )+exp(w wd )+exp(w ind )); Where λ1, λ2 and λ3 are L util , L WD and L ind The coefficient of util 、w wd and w ind L util , L WD and L ind The convergence speed.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes the method of any one of claims 1 to 6.

9. A computer device, characterized in that: include: One or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods of claims 1 to 6.

Citation Information

Patent Citations

  • Knowledge graph-based fairness recommendation algorithm

    CN116340595A