Fast Fair Tabular Data Generator using Autoregressive Decision Trees
Project description
TabFairGDT
TabFairGDT — Fast Fair Tabular Data Generator using Autoregressive Decision Trees.
Generates synthetic tabular data with built-in fairness constraints via leaf-relabeling of CART models.
Installation
pip install tabfairgdt
Quick Start
import pandas as pd
from tabfairgdt import TABFAIRGDT
df = pd.read_csv("data.csv")
df["income"] = df["income"].astype("category")
df["sex"] = df["sex"].astype("category")
dtype_map = {col: str(df[col].dtype) for col in df.columns}
# Map pandas dtypes to tabfairgdt types
dtype_map = {
col: "category" if df[col].dtype.name in ("category", "object", "bool")
else "float" if df[col].dtype.kind == "f"
else "int"
for col in df.columns
}
generator = TABFAIRGDT(
protected_attribute="sex",
target="income",
criterion="dp", # demographic parity
dtype_map=dtype_map,
seed=42,
)
generator.fit(df, lamda=0.5) # lamda=0: no fairness, lamda=1: max fairness
synthetic_df = generator.generate(k=1000)
Parameters
| Parameter | Default | Description |
|---|---|---|
protected_attribute |
required | Column name of the sensitive/protected attribute |
target |
required | Column name of the target variable |
dtype_map |
required | Dict mapping column names to dtypes ('int', 'float', 'category', 'bool', 'datetime') |
criterion |
"dp" |
Fairness criterion: "dp" (demographic parity) |
lamda |
0.5 |
Fairness–utility tradeoff passed to fit(): 0 = no fairness, 1 = max fairness |
acc_threshold |
-1 |
Max allowed accuracy drop as a fraction (e.g., 0.05 = 5%); -1 = no limit |
seed |
None |
Random seed for reproducibility |
parallel |
True |
Use parallel fitting across columns |
re_order |
False |
Reorder features by correlation ("corr_asc_target", "corr_desc_target", etc.) |
smoothing |
False |
Apply kernel smoothing to continuous columns ("density" or column dict) |
proper |
False |
Bootstrap training data during fitting |
Citation
@inproceedings{panagiotou2025tabfairgdt,
title = {TABFAIRGDT: A Fast Fair Tabular Data Generator using Autoregressive Decision Trees},
author = {Panagiotou, Emmanouil and Ronval, Benoît and Roy, Arjun and Bothmann, Ludwig and Bischl, Bernd and Nijssen, Siegfried and Ntoutsi, Eirini},
booktitle = {IEEE ICDM 2025},
year = {2025},
url = {https://arxiv.org/abs/2509.19927}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tabfairgdt-0.1.1.tar.gz
(25.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tabfairgdt-0.1.1.tar.gz.
File metadata
- Download URL: tabfairgdt-0.1.1.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a1ead1252025c838196580f6b790392be5e456958b397dccd580a92885d0614
|
|
| MD5 |
c382f566689a0d023003f431a54df85f
|
|
| BLAKE2b-256 |
70236a2381a432ed8bc80d85420e911c696ebc22fb35720ccc366adfbf5b9a4e
|
File details
Details for the file tabfairgdt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tabfairgdt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8696c2b4d5c81b6c2d19953fafbbb12683989dda043e1098e4d212467d475f1
|
|
| MD5 |
adf7b3020e9c86beb594ceec183b2c30
|
|
| BLAKE2b-256 |
4d2e6a776edf48a2b9fbaf87d420a4778d05e55fa08d646cbb2261a0437d21c9
|