Towards Automatic Bias Detection in Knowledge Graphs (2021)

Abstract: With the recent surge in social applications relying on knowledge graphs, the need for techniques to ensure fairness in KG based methods is becoming increasingly evident. Previous works have demonstrated that KGs are prone to various social biases, and have proposed multiple methods for debiasing them. However, in such studies, the focus has been on debiasing techniques, while the relations to be debiased are specified manually by the user. As manual specification is itself susceptible to human cognitive bias, there is a need for a system capable of quantifying and exposing biases, that can support more informed decisions on what to debias. To address this gap in the literature, we describe a framework for identifying biases present in knowledge graph embeddings, based on numerical bias metrics. We illustrate the framework with three different bias measures on the task of profession prediction, and it can be flexibly extended to further bias definitions and applications. The relations flagged as biased can then be handed to decision makers for judgement upon subsequent debiasing.

## introduction knowledge graphs (kgs) update and represent world knowledge in a structured and scalable format. they are commonly embedded into lower dimensional representations, namely knowledge graph embeddings (kges), which have successfully been applied in diverse applications such as personalized recommendations @xcite , question answering @xcite , and enhancement of language modeling @xcite @xcite . following the proliferation of social applications relying on kges, the issue of fairness in kg based methods is a growing concern. ## our framework for kge bias identification in this section, we begin with an overview of three specific bias measures we employ, which are defined over the relations in a kg. we then provide an overall description of our pipeline. ## experiments we applied our framework with the bias measurements described in section 3.1 to evaluate bias on two benchmark datasets; fb15k-237 @xcite and wikidata5m @xcite . each of the datasets was trained on four kge methods respectively; transe, compleex, distmult and ro-tate. the embeddings for fb15k-237 were trained using the entire dataset, through pykeen's hyperparameter optimization pipeline. for wikidata5m, we use pre-trained embeddings from graphvite foot_1 @xcite . to measure dpd and ppd, a random forest classifier was trained on the task of profession prediction in both datasets. we attempt classification of the 5 and 10 most common professions in fb15k-237 and wikidata5m respectively, and relabel the rest as "other". a pre-processing step was applied to remove any tails that appeared less than 10 times in the test set. ## discussion in this paper, we proposed a novel framework to systematically identify, measure and inform biases in knowledge graph embeddings (kge). the contribution of our model is to aid stakeholders and practitioners with a quantitative approach to identify biased relations in the kge. since biases are context-and culture-dependent, the final determination on what to debias may depend on the downstream task and is left to the practitioner. for example, one would want to remove gender biases from a question answering task about historical figures, while in medical related data, keeping gender information can be valuable for proper diagnosis. our implementation provides the user with bias scores rather than a binary decision. the choice of which relations to debias is then to be done by comparing the relative scores of relations in the kg, combined with domain knowledge. in future work, we would like to derive a threshold that can provide users with a binary score (biased/unbiased) for each