Skip to content

FairnessEM: fairness-aware entity matching

A fairness loss for the Ditto entity matcher

Problem
An can score a good F1 while its errors fall unevenly across groups of records.
What was done
Added a PPVP to in PyTorch and swept 11 loss weights across 10 configurations, 110 runs.
What changed
Average disparity fell 74%, from 0.0355 to 0.0094 at the best weight per configuration, with F1 near 0.82.
Average group disparity cut, best alpha per configuration
74%
Average group disparity, best alpha per configuration
0.0355 to 0.0094
Average F1
0.816 to 0.820
Runs, 10 configurations x 11 alpha values
110
F1 at alpha 1.0, false fairness
0.0113

Compare the three points on record

Disparity and F1, the points on record

Average group disparity and F1 at the three points on record
MeasureBeforeBest alphaAlpha 1.0
Disparitylower is fairer0.03550.0094near zero
F1scale 0 to 10.8160.8200.0113

The starting averages: group disparity 0.0355 and F1 0.816.

110 runs: 10 configurations x 11 alpha values. The per-alpha results are not in the public repository, so only these three points are drawn, with nothing between them.

Before: average disparity 0.0355, average F1 0.816.

Problem

An entity matcher can reach a good F1 while its errors fall unevenly across groups of records. A fairness fix only counts if F1 holds, because a model that stops predicting matches looks fair for the wrong reason.

Approach

I added a PPVP fairness loss to the Ditto matcher in PyTorch, weighted by alpha. I ran 10 configurations at 11 alpha values, 110 runs in all, and compared average group disparity and F1 at each weight.

Highlights

  • Average disparity fell 0.0355 to 0.0094 (74%) at each configuration's best alpha.
  • Average F1 moved from 0.816 to 0.820.
  • Swept 10 configurations at 11 alpha values, 110 runs in all.
  • Flagged false fairness at alpha 1.0, where F1 collapsed to 0.0113.
  • Near-zero disparity there came from a model that made almost no positive predictions.