Anti-fact fairness method for realizing partial observation sensitive attributes based on graph representation learning

By generating node context subgraphs, estimating sensitive attributes, and using counterfactual data augmentation, the problem of inherited bias in graph neural networks in graph data is solved, achieving counterfactual fairness in node representation learning and improving the fairness and predictive consistency of node representations.

CN119005306APending Publication Date: 2024-11-22GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410251542.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing graph neural networks are prone to inheriting social biases when processing graph data, especially in learning node representations related to sensitive attributes. This can lead to ethical and social problems in high-risk decision-making scenarios. Furthermore, existing methods struggle to achieve counterfactual fairness in node representation learning on graph data.

Method used

By generating a context subgraph for each node, calculating importance scores using a personalized PageRank algorithm, estimating sensitive attributes using a graph convolutional network, employing a graph transformation autoencoder for counterfactual data augmentation, and utilizing a Siamese network to learn fair node representations, counterfactual fair graph representation learning is achieved.

Benefits of technology

It effectively mitigates the causal impact of sensitive attributes in graph data, improves the fairness of node representation, ensures the consistency of node predictions across different counterfactual scenarios, and reduces decision bias.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005306A_ABST
    Figure CN119005306A_ABST
Patent Text Reader

Abstract

According to the method, partial observation of sensitive attributes is realized, and an anti-fact fair graph representation learning method is realized. According to the method, the situation that sensitive attributes which can be directly observed are missing to a certain degree due to user privacy preference differences is mainly considered, and correct anti-fact fair map representation cannot be obtained by learning individual data with the missing sensitive attributes. Therefore, the learning method is specially provided. According to the principle that individuals with the same sensitive attribute in a graph neural network are more easily gathered together, a sensitive attribute estimator is deployed, and a real sensitive attribute value of a sensitive attribute missing node is accurately predicted according to a non-sensitive attribute value of the sensitive attribute missing node and a feature attribute value of a neighbor node of the sensitive attribute missing node. And after completion operation of the sensitive attribute estimator, real graph data after sensitive attribute completion can be obtained, so that anti-fact fair graph representation of all nodes can be obtained through learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of <graph representation learning>, and specifically relates to a counterfactual fairness method for realizing partial observation sensitive attributes based on graph representation learning. Background Art

[0002] Everything in the universe, from stars to atoms and molecules, is constantly in relationship with other individuals. This relationship between individuals can be represented by a graph. In real life, there is a large amount of graph structure data, such as social network data such as Sina Weibo, Facebook, Twitter, as well as biochemical molecular structure data, brain network data, citation network data, knowledge graphs, etc. A graph is a nonlinear structure that is more complex than a tree structure. The graph contains a series of vertices and edges, where vertices can be represented as individuals and edges can be represented as relationships between individuals. At the same time, vertices or edges can be accompanied by some information (features) describing themselves. By learning the features of vertices and edges, it can serve well for processing graph data. Neural networks have excellent performance in data feature extraction, but simply converting graphs into Euclidean structure data and then processing them with traditional neural network methods will cause the loss of topological structure information. Therefore, a more effective graph structure data processing method - Graph Neural etwork (GNN) came into being, and developed into many branches, such as Graph Convolutional Network (GCN), Graph Auto-encoder (GAE), Graph Generative Network (GGN), Graph Attention Network (GAT), etc.

[0003] Graph Neural Networks (GNNs) have achieved remarkable results in various fields such as knowledge graphs, social media mining, natural language processing, and recommendation systems. Typically, a message passing process is used in GNNs, where information from neighbors is aggregated for each node in each layer. This process enriches the node representation and preserves the characteristics and topological structure of the node itself.

[0004] Despite the success in graph data modeling, GNNs trained on graphs may inherit social biases in the data, which limits the adoption of GNNs in many practical applications. First, extensive studies have shown that historical data may include previous discrimination patterns and social biases. Machine learning models trained on such data can inherit biases for sensitive attributes such as age, gender, skin color, and region, which means that GNNs may also exhibit bias. Second, the topological structure of the graph and the message passing of GNNs may amplify biases. Generally speaking, in graphs such as social networks, nodes with similar sensitive attributes are more likely to be connected to each other than nodes with different sensitive attributes. For example, young people tend to establish friendships with people of similar age on social networks. This makes the aggregation of neighbor features in GNNs have similar representations for nodes with similar sensitive information, but different representations for nodes with different sensitive features, resulting in serious bias in decision making, that is, predictions are highly correlated with nodes with sensitive attributes of sensitive information. This bias will largely limit the widespread adoption of GNNs in fields such as job applicant ranking and crime rate prediction. Therefore, it is important to study fair GNNs.

[0005] Graph representation learning aims to map nodes into latent embedding spaces, and these node representations are often used for downstream prediction, classification tasks, and have become the state-of-the-art in multiple real-world applications. However, these node representation learning methods may ignore potential biases hidden in graph data, thereby introducing algorithmic biases against subgroups defined by certain sensitive attributes. As a result, this may raise ethical and social issues, especially in high-stakes decision-making scenarios such as job applicant ranking and credit scoring. For example, if a bank's decision on a loan application is influenced by sensitive attributes of the applicant and his or her close contacts, this will become a serious ethical issue.

[0006] To address the above issues, scholars have proposed some methods to evaluate and address the fairness of learning node representations on graphs. Among these methods, most aim to learn node representations that will produce statistically fair predictions for the entire group. In addition, the concept of counterfactual fairness has recently been extended to graph structured data. Unlike previous statistical concepts, counterfactual fairness extends the causal structure model and aims to encourage that predictions made by different versions of the same person (also called counterfactuals) are equal.

[0007] However, learning graph representations that are counterfactually fair is non-trivial. First, to achieve counterfactual fairness, we need to obtain a large number of nodes with known sensitive attributes so that we can modify the data or regularize the model; people are reluctant to share their sensitive information in the real world, resulting in a shortage of nodes with sensitive attributes that are known for counterfactual fair model learning. Second, although great efforts have been made to build fair models through feature modification, untangling, adversarial debiasing, and fairness constraints, they are overwhelmingly devoted to independent and identically distributed (iid) data and cannot be directly applied to graph data because they do not simultaneously consider the bias of node attributes and graph structure. Summary of the invention

[0008] The purpose of the present invention is to overcome the defects in the above-mentioned prior art and provide a new method for learning counterfactual graph representation for some observation sensitive attributes.

[0009] 1. Subgraph generation

[0010] Since the true causal model of graph data is usually difficult to fully obtain, especially for large-scale graphs, based on a common observation that each node is mainly affected by its nearest neighbors, we extract a subgraph Contains the node features X of each node (i) and the adjacency matrix A (i) The subgraph extracts The context information of the central node i on The subgraph of contains only the top-k neighbors of node i (including itself). These top-k neighbors are usually within a few hops from the central node. Specifically, for each node i on the graph, we use the subgraph generator Sub(·) to generate its context subgraph Based on these context subgraphs, we learn representations of their corresponding central nodes. This is based on the common assumption that each node has low dependencies with nodes outside its context subgraph. Therefore, each subgraph is expected to be informative enough in terms of its graph structure relative to the central node to enable high-quality representation learning and post hoc counterfactual data augmentation.

[0011] Inspired by the subgraph-based node representation learning method, we first use a personalized pagerank algorithm to calculate the importance score of each node pair. The importance score can be calculated as: Where R is the importance score matrix, each entry R i,j Describes the importance of node j to node i, R i,: represents the importance score vector of node i. α is a parameter in the range [0, 1] and I is the identity matrix. represents a column-normalized adjacency matrix, where D is D i,i =∑ j A i,j The corresponding diagonal matrix. We calculate R in the preprocessing stage before model training to improve efficiency. With the importance scores, we use the TOP(·) operation to select the top-k important nodes for each center node i. Then the context subgraph The formula is as follows:

[0012]

[0013]

[0014]

[0015] The symbol : represents all indices. The above subgraph generation process (Equations (1) to (3)) is defined as The generated subgraph is then fed into the encoder to learn the representation of the central node.

[0016] 2. Sensitive Attribute Estimator

[0017] In the case where sensitive attributes are partially missing due to differences in individual sensitive attributes, because in reality some individuals pay more attention to personal privacy protection and are unwilling to share these sensitive attributes, this results in a very small size. Even with adversarial debiasing, the lack of data with labeled sensitive attributes will lead to poor improvements in fairness. Although our sensitive attribute nodes are limited, i.e. small, nodes with similar sensitive attributes are usually more likely to be connected to each other, which makes it possible to accurately predict the sensitive attributes of nodes in the graph using the graph sum. Therefore, we deployed a graph convolutional network to estimate the sensitive attributes of nodes where sensitive attributes are not available. A large number of estimated sensitive attributes will greatly benefit adversarial debiasing. Note that it is important to use two separate GNNs for node label prediction and sensitive attribute prediction because our goal is to learn Fair representation , that is, it does not contain sensitive information. The objective function of the training is:

[0018]

[0019] in Yes E Prediction Node The sensitive attribute of E Yes E Parameters. Use f E , we can get the node Sensitive attributes We use To represent the set of sensitive attributes, S and Combined, that is

[0020] 3. Counterfactual Data Augmentation

[0021] To achieve graph counterfactual fairness, we pre-train a counterfactual data augmentation module before node representation learning. Here, we consider a relatively simple but general causal model to generate counterfactuals for each subgraph. Based on common observations, we assume that the sensitive attribute is exogenous, i.e., it has no parent variable in the causal graph, and it causally affects other node features, graph structure, and labels. Based on our assumed causal model, once we intervene in the sensitive attribute, we need to model how other variables change accordingly. To achieve this goal, we use a graph variation autoencoder (GraphVAE) as a base module, which takes each context subgraph as input and encodes each node in the subgraph into a latent embedding h i , then the decoder reconstructs the latent embedding H = {h1,…,h k} and the sensitive attribute values ​​of k nodes in the subgraph. Reconstruction loss As follows (for simplicity of notation, we omit the superscript (·) (i) ):

[0022]

[0023] where p(H) is a standard normal prior distribution. We sample the embedding H from q(H|X,A). Since the sensitive attributes are assumed to be exogenous, we can mitigate the causal effect of sensitive attributes on the embedding by eliminating the statistical dependencies between them. To achieve this goal, we use an adversarial learning approach to learn the same embedding for each node and its neighbors with different sensitive attribute values. Specifically, we use a discriminator here to predict a summary of neighboring sensitive attribute values. For a subgraph We put the summary of all nodes in As the average aggregation, We divide the summary into B ranges to formulate it as a multivariate classification task with the discriminator D(·). We use the following fairness constraint: The discriminator D(H, b) predicts the probability that the summary of sensitive attribute values ​​is within the range of b. According to the theoretical analysis in, is a regularizer that minimizes the mutual information between the summary and embedding of sensitive attribute values. The final loss for counterfactual data augmentation is: where β is a hyperparameter of the fairness constraint weight. We use alternating stochastic gradient descent for optimization: 1) We minimize by fixing the discriminator and updating the parameters of the other parts 2) With respect to the discriminator we minimize while other parts are fixed. To achieve counterfactual fairness for graphs, we expect the embedding H to capture latent variables that are informative about the input subgraph but are not causally affected by sensitive properties of nodes in the subgraph. We pre-train the counterfactual data augmentation module to better disentangle different components of the framework. If more prior knowledge of the causal model is provided, we can incorporate it into the counterfactual data augmentation, e.g., directly generate counterfactuals using a given causal model, and no other components in the framework need to be changed.

[0024] 4. Counterfactual Fair Representation Learning

[0025] Based on the above counterfactual data augmentation, we learn fair representations that are expected to achieve the same predicted label for the same node in different counterfactuals. To achieve this goal, we use the Siamese network to encode three subgraphs: the original subgraph Counterfactual subgraph and represents the value of each central node i For graph counterfactual fairness, we hope to learn the same representation for each central node from the three subgraphs. We train a subgraph encoder φ(·) for all central nodes i in the three subgraphs to generate z i , z i We then minimize the distance between the central node representations learned from the original subgraph and the counterfactual. We formulate the loss for graph counterfactual fairness as:

[0026]

[0027] where d(·) is a distance metric, such as cosine distance. s ∈{0, 1} is a hyperparameter that controls the weight of neighbor perturbations. From the original subgraph and the counterfactual, we obtain node representations as follows:

[0028] z i =(φ(x (i) , A (i) )) i (7)

[0029]

[0030]

[0031] in Each subgraph is taken as input and each node on the input subgraph is embedded into a latent representation. We denote each central node i learned from the original data as z i , and we use As a downstream task. and We aggregate the representation of each central node i using an aggregator (e.g., mean aggregator) AGG(·) to obtain the final representation and z i .

[0032] To encode useful information about node features and graph structure into the representation, we use labels as supervision. We take the node classification task as an example, but our framework can be naturally extended to other types of tasks on graph data, such as link prediction. We denote the class label of node n as Y = {y1, ..., y n}. The prediction loss can be expressed as:

[0033]

[0034] where l(·) is a loss function that measures the prediction error (e.g., cross entropy), and f(·) uses the representation to make predictions for the downstream task, i.e. Finally, the overall loss function for fair representation learning is:

[0035]

[0036] where θ is the set of model parameters, λ and μ are hyperparameters that control the weights of the counterfactual fairness constraints on the graph, and L2 denotes norm regularization. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Flowchart of the counterfactual fairness method for partially observing sensitive attributes based on graph representation learning in the present invention DETAILED DESCRIPTION

[0038] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] Step 1: Collect data;

[0040] Step 1 is specifically implemented as follows: Select Bail and German graph datasets with different topological structures and different sizes. Test the effects of different node classification algorithms when the size of the nodes increases from small to large and the topological structure increases from simple to complex. This avoids the situation where the experimental results of a single graph dataset cannot reflect the effect of the node classification algorithm in general.

[0041] Step 2: pre-process the data collected in step 1;

[0042] Step 2 is specifically implemented as follows: take the adjacency matrix and node list of the two graph datasets in step 1 as input, and randomly divide the graph dataset into three files: training set, validation set, and test set.

[0043] In step 2: Divide the data set in a ratio of 6:2:2, dividing 60% of the data set into a training set, 20% into a validation set, and 20% into a test set.

[0044] Take the adjacency matrix and node list of the two graph datasets in step 1 as input. In order to improve the generalization ability of the model, we randomly divide the graph dataset into three files: training set, validation set, and test set. Use the data of the training set to train the model, then learn the hyperparameters of the model in the validation set, and finally use the error of the model on the test set as the generalization error of the final model in dealing with real-world scenarios. Divide the dataset into three parts: training set, validation set, and test set. To verify the final effect of the model, you only need to calculate the error of the trained model on the test set, and you can think that this error is an approximation of the generalization error. In the experiment, we divide it in a ratio of 6:2:2, dividing 60% of the dataset into the training set, 20% into the validation set, and 20% into the test set.

[0045] Step 3: Divide the subgraph

[0046] Step 3 is implemented as follows: Since the size of each graph data is relatively large, it is difficult for us to obtain a causal model for the entire graph data set. Therefore, we use a personalized PageRank algorithm to calculate the importance score R of each node pair:

[0047]

[0048] Then we find the important nodes in the graph dataset according to the importance score and set them as the central node t. (i) and the adjacency matrix A (i) Generate a subgraph based on node i

[0049] Step 4: Complete sensitive attributes

[0050] Step 4 is implemented as follows: Check the sensitive attributes in each subgraph. If any sensitive attributes are missing, use the graph convolutional network we deployed previously. To estimate the sensitive attributes of nodes where sensitive attributes are not available. That is, the sensitive attributes of all nodes adjacent to the node with missing sensitive attributes are taken as input for the prediction task, and the prediction results are taken as the sensitive attributes of the node with missing attributes.

[0051] Step 5: Counterfactual Data Augmentation

[0052] Step 5 is specifically implemented as follows: We use self-perturbation and neighbor perturbation to obtain the corresponding counterfactual graph embedding for the subgraph after sensitive attribute completion. That is:

[0053] We perturb the original subgraph to obtain different types of counterfactuals. We generate two kinds of perturbations, including self-perturbation on the sensitive attributes of the central node and neighbor perturbation on the sensitive attributes of other nodes in the subgraph.

[0054] Self-perturbation. In the subgraph In , we take its node embedding, flip the sensitive attribute value of the central node si, and then input the embedding and perturbed sensitive attributes into the decoder of the pre-trained counterfactual data augmentation module, and use the reconstructed subgraph as the corresponding counterfactual. The set of subgraphs after self-perturbation is denoted as

[0055] Neighbor perturbation. Similarly, in the subgraph In this paper, we randomly perturb the sensitive attribute values ​​of any node except the central node, that is, the set After such perturbations, we generate a set of counterfactuals Where SMP(·) is from the value space We use the parameter C to denote the number of SMP(·) operations in the neighbor perturbation.

[0056] Step 6: Counterfactual Fairness Graph Representation

[0057] Step 6 is specifically implemented as follows: Counterfactual subgraph and represents the value of each central node i They are input into the twin neural network in sequence, and a subgraph encoder φ(·) is trained for all the central nodes i in the three subgraphs to generate z i , z i We then minimize the distance between the central node representations learned from the original subgraph and the counterfactual, and finally obtain a counterfactual fair representation of the graph.

Claims

1. A counterfactual fairness method for partially observing sensitive attributes based on graph representation learning includes the following steps: Collect data; Pre-process the collected data; Divide the subgraph; Sensitive attribute completion; Counterfactual data augmentation; Counterfactual fairness graph representation.

2. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 1, characterized in that: We selected Bail and German graph datasets with different topological structures and sizes. We tested the effects of different node classification algorithms when the size of nodes increased from small to large and the topological structure increased from simple to complex. We avoided the situation where the experimental results of a single graph dataset could not reflect the effects of node classification algorithms in general.

3. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 2, characterized in that: The adjacency matrix and node list of the two graph datasets in requirement 1 are used as input. In order to improve the generalization ability of the model, the entire graph dataset is randomly divided in a ratio of 6:2:2, that is, 60% of the dataset is divided into a training set, 20% into a validation set, and 20% into a test set. The data in the training set is used to train the model, and then the hyperparameters of the model are learned in the validation set. Finally, the error of the model on the test set is used as the generalization error of the final model in dealing with real-world scenarios. To verify the final effect of the model, you only need to calculate the error of the trained model on the test set, and you can think that this error is an approximation of the generalization error.

4. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 3, characterized in that: Since the size of each graph data is relatively large, it is difficult for us to obtain a causal model for the entire graph data set. Therefore, we use a personalized PageRank algorithm to calculate the importance score R of each node pair: Then we find the important nodes in the graph dataset according to the importance score and set them as the central node i. (i) and the adjacency matrix A (i) Generate a subgraph based on node i 5. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 4, characterized in that: Check the sensitive attributes in each subgraph. If any sensitive attributes are missing, use the graph convolutional network f deployed previously. E : To estimate the sensitive attributes of nodes where sensitive attributes are unavailable. That is, the characteristic attribute values ​​of all nodes adjacent to the node with missing sensitive attributes and its own non-sensitive attribute values ​​are used as input for the prediction task, and the prediction results are used as the sensitive attributes of the node with missing attributes.

6. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 5, characterized in that: We perturb the subgraph after sensitive attribute completion to obtain different types of counterfactuals. We generate two kinds of perturbations, including self-perturbation on the sensitive attributes of the central node and neighbor perturbation on the sensitive attributes of other nodes in the subgraph. Self-perturbation. In the subgraph In , we take its node embedding and flip the center node s i The embedded and perturbed sensitive attributes are then fed into the decoder of the pre-trained counterfactual data augmentation module, and the reconstructed subgraph is used as the corresponding counterfactual. The set of subgraphs after self-perturbation is denoted as Neighbor perturbation. Similarly, in the subgraph In this paper, we randomly perturb the sensitive attribute values ​​of any node except the central node, that is, the set After such perturbations, we generate a set of counterfactuals Where SMP(·) is from the value space We use the parameter C to denote the number of SMP(·) operations in the neighbor perturbation.

7. The method for implementing counterfactual fairness of partially observed sensitive attributes based on graph representation learning as claimed in claim 6, characterized in that: The original sub-graphs Counterfactual subgraph and represents the value of each central node i They are input into the twin neural network in sequence, and a subgraph encoder φ(·) is trained for all the central nodes i in the three subgraphs to generate z i , z i We then minimize the distance between the central node representations learned from the original subgraph and the counterfactual, and finally obtain a counterfactual fair representation of the graph.

Citation Information

Cited By

  • Fair map representation obtaining method for clustering

    CN121746746A