<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fairness | DTAI Stories</title><link>https://dtai.cs.kuleuven.be/stories/tags/fairness/</link><atom:link href="https://dtai.cs.kuleuven.be/stories/tags/fairness/index.xml" rel="self" type="application/rss+xml"/><description>Fairness</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Tue, 13 Oct 2026 10:06:09 +0200</lastBuildDate><image><url>img/map[gravatar:%!s(bool=false) shape:circle]</url><title>Fairness</title><link>https://dtai.cs.kuleuven.be/stories/tags/fairness/</link></image><item><title>ProbLog4Fairness: A Neurosymbolic Approach to Modeling and Mitigating Bias</title><link>https://dtai.cs.kuleuven.be/stories/post/rik-adriaensen/problog4fairness/</link><pubDate>Tue, 13 Oct 2026 10:06:09 +0200</pubDate><guid>https://dtai.cs.kuleuven.be/stories/post/rik-adriaensen/problog4fairness/</guid><description>&lt;p>Machine learning algorithms are all around us. They decide which advertisements we see, which route our GPS recommends, and even whether our
&lt;a href="https://themarkup.org/denied/2021/08/25/the-secret-bias-hidden-in-mortgage-approval-algorithms" target="_blank" rel="noopener">loan request is granted&lt;/a>. Although these applications look very different, they all share the same core idea: learning a function from data.&lt;/p>
&lt;p>Depending on the task, this function can take many forms. It could be:&lt;/p>
&lt;ul>
&lt;li>a function mapping images of cats and dogs to the labels “cat” and “dog”,&lt;/li>
&lt;li>a function mapping a piece of text to the most likely next word,&lt;/li>
&lt;li>or a function mapping a person&amp;rsquo;s age, income and education level to the probability that they can repay a loan.&lt;/li>
&lt;/ul>
&lt;p>Some of these tasks involve high-dimensional inputs such as images or text. Others work on &lt;em>tabular data&lt;/em>, where each example consists of only a small number of variables (e.g., age, income and education level). In all cases, it is useful to think of the learned function not as a deterministic mapping from an input $X$ to an output $Y$, but as a conditional probability distribution $P(Y \mid X)$, which describes how likely each output $Y$ is given the input $X$.&lt;/p>
&lt;p>To find this target function, we choose a family of models, for example neural networks, and search for the member that fits best. The search is driven by a dataset of example inputs with their corresponding outputs, and it relies on one crucial assumption: that this dataset is representative of the function we want to learn. Unfortunately, this assumption is often violated in practice.&lt;/p>
&lt;h2 id="bias-in-datasets">Bias in datasets&lt;/h2>
&lt;p>Real-world datasets are shaped by historical decisions, measurement limitations, and human judgment. When the dataset systematically differs from the function we actually want to model, we say the dataset contains &lt;em>bias&lt;/em>.&lt;/p>
&lt;p>Suppose we want to train a model to predict whether someone can repay a loan based on their age, income and education level.&lt;/p>
&lt;div style="display:flex; justify-content:center; align-items:stretch; gap:16px; width:100%;">
&lt;figure style="flex:1; margin:0;">
&lt;img src="loan_approval.png" alt="Schematic of loan approval example" style="width:100%; height:320px; object-fit:contain; display:block;">
&lt;/figure>
&lt;/div>
&lt;p>Ideally, the labels in the dataset would reflect the person&amp;rsquo;s actual ability to repay. In practice, the dataset is often constructed from or influenced by historical decisions. For example, a bank may use past loan approvals and rejections as training data, which may have been overly strict for younger applicants. Then the dataset no longer reflects $P(\text{can pay loan} \mid X)$, but instead reflects $P(\text{bank approves loan} \mid X)$.&lt;/p>
&lt;p>The model is now learning the behavior of the bank rather than the target function we actually care about, and these two functions differ systematically for young applicants. This type of bias, where the &lt;em>label&lt;/em> is biased for a subgroup of the dataset (i.e., the young applicants), is known as &lt;em>label bias&lt;/em>.&lt;/p>
&lt;p>Training a standard model on such a dataset causes two problems. First, the predictive performance at test time degrades. The model learned patterns that do not hold in the setting where it will be deployed: it underestimates how well young people can repay. Second, the model reproduces the unfair patterns in the data. The errors it makes are not random, they are concentrated in exactly the subgroup that the bias affected.&lt;/p>
&lt;p>Both problems have the same solution. If we manage to approximate the correct target function despite the biased dataset, the accuracy at test time improves and, almost as a happy side-effect, the model becomes more fair. Collecting an unbiased dataset would work as well, but that is often very costly or simply impossible. The bank could, for example, grant a bunch of loans without any screening to find out who repays, but that takes a long time and loses money. Let&amp;rsquo;s find a better way.&lt;/p>
&lt;h2 id="modeling-bias-with-logic-and-probability">Modeling bias with logic and probability&lt;/h2>
&lt;p>Before correcting for the bias, we need a way to describe it. To do this, we use
&lt;a href="https://dtai.cs.kuleuven.be/stories/stories/post/robin-manhaeve/deepproblog/">DeepProbLog&lt;/a>, a framework that combines probabilistic reasoning with neural networks by extending the logic programming language Prolog. In Prolog, a program consists of facts and rules. For example:&lt;/p>
&lt;p>$$
\begin{aligned}
&amp;amp;\mathsf{age(ann, 18).} \\
&amp;amp;\mathsf{young(X) \mathrel{\vcenter{\hbox{:}}{-}} age(X, Y), Y &amp;lt; 25.}
\end{aligned}
$$&lt;/p>
&lt;p>The first statement is a fact: Ann is 18 years old. The second is a rule: a person is young if their age is below 25. DeepProbLog extends this idea by allowing facts to carry a probability, which may be predicted by a neural network. The neural network $\mathsf{h(X)}$ estimating $P(\mathsf{can\_pay\_loan} \mid X)$ is then expressed by the fact&lt;/p>
&lt;p>$$
\mathsf{h(X) :: can\_pay\_loan(X).}
$$&lt;/p>
&lt;p>where $\mathsf{X}$ is a variable that will be replaced by the available inputs.&lt;/p>
&lt;p>We can now describe the label bias example we saw before using the following program&lt;/p>
&lt;p>$$
\begin{aligned}
&amp;amp;\mathsf{h(X) :: can\_pay\_loan(X).}\\
&amp;amp;\mathsf{young(X) \mathrel{\vcenter{\hbox{:}}{-}} age(X, Y), Y &amp;lt; 25.}\\
&amp;amp;\mathsf{p\_bias :: bias\_when\_young.}\\
&amp;amp;\mathsf{biased(X) \mathrel{\vcenter{\hbox{:}}{-}} young(X), bias\_when\_young.}\\
&amp;amp;\mathsf{gets\_loan(X) \mathrel{\vcenter{\hbox{:}}{-}} can\_pay\_loan(X), not(biased(X)).}
\end{aligned}
$$&lt;/p>
&lt;p>On the first line the neural network predicts the probability that a person with inputs $\mathsf{X}$ can repay a loan. The second line decides whether the person is young. The final three lines express that bias occurs for young people with probability $\mathsf{p\_bias}$ and that someone gets a loan if they can pay it back and no bias occurred. The probability $\mathsf{p\_bias}$ is either derived by studying the process that introduced the bias, or estimated on a small subset of the data for which both biased and unbiased labels are available.&lt;/p>
&lt;p>Such a program describes how the observed labels differ from the true labels we actually care about. It can flip true labels to negative labels, as in the example, but also the other way around. It can combine different causes of bias, each with its own probability. In fact, any bias that can be represented as a Bayesian network, common practice in the field of algorithmic fairness, can be written as a DeepProbLog program! Beyond what is common in algorithmic fairness, the input $X$ is also not restricted to tabular data. The neural network $\mathsf{h(X)}$ natively handles images or text.&lt;/p>
&lt;h2 id="mitigating-bias-automatically">Mitigating bias automatically&lt;/h2>
&lt;p>Once the program is defined, we can ask it queries. Suppose we have a 24-year-old applicant with an income of €30,000 and a high education level, and we want to know the probability that this person gets a loan. Only two things are uncertain here: whether the applicant can repay, which the neural network estimates, and whether bias occurred, which happens with the probability we fixed in advance. The program combines these into a single probability and this probability varies smoothly with the output of the neural network. This means we can train the whole thing end-to-end, exactly as in standard machine learning: we compare the answer of the program to the biased label in our dataset, which is the only one we have, and propagate the error back into the neural network.&lt;/p>
&lt;div style="display:flex; justify-content:center; align-items:stretch; gap:16px; width:100%;">
&lt;figure style="flex:1; margin:0;">
&lt;img src="problog4fairness.jpg" alt="Schematic of ProbLog4Fairness applied to loan approval." style="width:100%; height:320px; object-fit:contain; display:block;">
&lt;/figure>
&lt;/div>
&lt;p>And this is precisely what solves our problem. The part of the process that introduces the bias is described by the rules of our program and remains fixed, so the neural network can neither change it nor does it have to learn it. Its only way to explain the observed labels is to predict who can actually repay. At deployment we can then simply evaluate the neural network without the program, and we obtain a predictor that is both more accurate and more fair.&lt;/p>
&lt;h2 id="experiments">Experiments&lt;/h2>
&lt;p>Let&amp;rsquo;s verify our approach with a small experiment. We generate a tabular dataset with three inputs $X_1$, $X_2$, $X_3$ and an input $A$ that we use to introduce bias. The true label $Y$ depends on all four, with some noise added. We then bias the training data: whenever $A$ is true, we set the observed label $\hat Y$ to false with probability $\beta^{\text{label}}_Y$.&lt;/p>
&lt;p>For a range of values of $\beta^{\text{label}}_Y$, we train our model with the correct DeepProbLog program and evaluate the resulting neural network on an unbiased test set. As baselines we take an unbiased model (trained on the data without the bias), a biased model (trained on the data with the bias), and three simple, well-known baselines. Note that those three try to remove every dependence on $A$, while in our setting part of that dependence is correct and should stay. Despite being trained on the biased data, our model comes very close to the unbiased model!&lt;/p>
&lt;p>The left plot shows the accuracy and the right plot shows the gap in average predicted probability between the group with $A = 0$ and the group with $A = 1$. The three simple baselines push this gap to zero, while our method matches the gap of the unbiased model, which is exactly where it should be.&lt;/p>
&lt;div style="display:flex; justify-content:center; align-items:stretch; gap:16px; width:100%;">
&lt;figure style="flex:1; margin:0;">
&lt;img src="bsweep_dependent.jpg" alt="Accuracy and statistical disparity for increasing bias probability" style="width:100%; height:320px; object-fit:contain; display:block;">
&lt;/figure>
&lt;/div>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>DeepProbLog programs offer a very flexible way to describe bias and the resulting model trains just like any other. It also works when the input is not tabular but contains image data, and it lets us state whatever assumption about the bias we believe to be correct, whereas other methods are stuck with one fixed assumption that does not always hold.&lt;/p>
&lt;p>So if you find yourself stuck with a biased dataset, consider whether you can describe the bias before going out to collect new data. Our
&lt;a href="https://github.com/ML-KULeuven/PL4Fairness" target="_blank" rel="noopener">code&lt;/a> and the
&lt;a href="https://dl.acm.org/doi/10.1609/aaai.v40i24.39033" target="_blank" rel="noopener">full paper&lt;/a> are available if you want to try it out.&lt;/p></description></item></channel></rss>