← Latest papers
💻 computer science

Do Counterfactually Fair Image Classifiers Satisfy Group Fairness? -- A Theoretical and Empirical Study

This paper investigates the relationship between counterfactual and group fairness in image classification by constructing new datasets with human-labeled counterfactuals, revealing that counterfactual fairness does not inherently guarantee group fairness due to latent attribute correlations, and proposing a Counterfactual Knowledge Distillation method to mitigate this issue.

Original authors: Sangwon Jung, Sumin Yu, Sanghyuk Chun, Taesup Moon

Published 2026-07-09
📖 5 min read🧠 Deep dive

Original authors: Sangwon Jung, Sumin Yu, Sanghyuk Chun, Taesup Moon

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are hiring a manager for a company. You want to make sure your hiring algorithm is fair. But what does "fair" actually mean?

This paper explores two different definitions of fairness and discovers that they don't always get along, especially when looking at photos of people. Here is the story of their findings, explained simply.

The Two Definitions of Fairness

Think of fairness like two different rules for a game:

  1. Group Fairness (The "Team Score" Rule): This rule says that if you look at two different groups of people (e.g., men and women), the algorithm should treat them equally on average. If 90% of men get hired, 90% of women should get hired too. It's about the big picture statistics.
  2. Counterfactual Fairness (The "What If" Rule): This is a more philosophical rule. It asks: "If we took this specific person, changed only their gender (but kept everything else about them exactly the same), would the algorithm still make the same decision?" If the answer is "yes," the algorithm is counterfactually fair. It's about consistency for the individual.

The Problem: The "Magic Mirror" Doesn't Exist

To test the "What If" rule (Counterfactual Fairness), you need a special kind of photo. You need a picture of a person, and then a second picture of the exact same person where only their gender has changed (e.g., a man with a beard becomes a man without a beard, but with the same nose, eyes, and background).

In the real world, you can't take a photo and magically swap a person's gender while keeping their identity perfect. Previous studies tried to use computer-generated images, but they often looked fake or changed other things (like the background) by accident.

The Paper's First Move: The authors built a "Magic Mirror" using a high-tech AI image editor (called InstructPix2Pix). They took real photos of celebrities and edited them to change the person's sex (e.g., turning a woman into a man) while trying to keep everything else identical. They then had human experts check these photos to make sure the changes were accurate and nothing else got messed up. They created two new, high-quality datasets for this purpose.

The Big Discovery: The "Hair Length" Trap

The authors tested their fairness rules using these new photo datasets. They found something surprising that contradicted previous research done on spreadsheets (tabular data):

In photos, being "Counterfactually Fair" does NOT guarantee you are "Group Fair."

Why? The authors explain this with a clever analogy involving Hair Length.

Imagine the algorithm is trying to guess if a person is applying for a "Hair Stylist" job (the target).

  • The Sensitive Attribute: Sex (Male/Female).
  • The Trap (Attribute G): Hair Length.

In the real world, hair length is highly correlated with sex (many men have short hair, many women have long hair), but hair length doesn't cause someone's sex. It's just a side effect.

Here is the trap:

  1. The algorithm learns to be "Counterfactually Fair." It successfully ignores the "Sex" label.
  2. However, because it's so good at ignoring "Sex," it starts relying heavily on Hair Length to make its decision.
  3. Now, if you have a man with long hair, the algorithm treats him like a woman because of his hair. If you have a woman with short hair, it treats her like a man.
  4. Even though the algorithm is "fair" in the "What If" sense (it ignores the sex label), it creates a huge unfairness in the "Group" sense because it's treating people differently based on their hair, which is still linked to their sex.

The paper calls this hidden variable G (for the third-party attribute). It's like a "shortcut" the algorithm takes.

The Solution: Teaching the Algorithm to Ignore the Shortcut

The authors propose a simple fix called Counterfactual Knowledge Distillation (CKD).

Think of it like a teacher-student relationship:

  • The Student: The new AI model trying to learn fairness.
  • The Teacher: A model that was trained without any fairness rules (a "vanilla" model).

Surprisingly, the "Teacher" model is actually better at ignoring the "Hair Length" trap than the "Student" trying to be fair. The "Student" is so focused on ignoring the "Sex" label that it over-corrects and latches onto "Hair Length."

The CKD method works like this:

  1. The Teacher looks at a photo and its "What If" version. It gives a prediction.
  2. The Student tries to copy the Teacher's thinking process.
  3. By copying the Teacher, the Student learns to ignore the "Hair Length" trap while still respecting the "What If" rule.

The Result

When the authors used this "Teacher-Student" method:

  • The models became Counterfactually Fair (they handled the "What If" scenarios correctly).
  • AND they became Group Fair (they treated men and women equally overall).

Summary

The paper shows that in image recognition, trying to be fair to the individual (Counterfactual Fairness) can accidentally make the whole group unfair if the AI relies on hidden clues like hair length. By using a "Teacher" model to guide the AI away from these hidden clues, they managed to achieve fairness on both fronts.

Important Note: The paper strictly focuses on image classification (like recognizing faces or attributes in photos) and does not claim these results apply to medical diagnoses, hiring decisions in the real world, or other specific applications beyond the theoretical and experimental scope described.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →