MiniACSIncome
A benchmark for fairness verification of neural networks.
The benchmark is based on the ACSIncome dataset from the folktables package.
MiniACSIncome is based on USA census data from 2018.
Examples
Load a MiniACSIncome dataset.
from miniacsincome import MiniACSIncome
dataset = MiniACSIncome(num_variables=5)
dataset[0]
# (tensor([ 0., 1., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
# 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
# 0., 1., 0., 0., 0., 0., 60., 0., 0., 1., 0., 0.]),
# tensor(0)
The MiniACSIncome class is a torch.utils.data.Dataset.
It can be used with the usual PyTorch dataloaders.
Load a trained MiniACSIncome dataset from the benchmark.
from miniacsincome import get_network
get_network(num_variables=5)
# Sequential(
# (0): Linear(in_features=40, out_features=10, bias=True)
# (1): ReLU()
# (2): Linear(in_features=10, out_features=2, bias=True)
# )
The last part of MiniACSIncome are the input distributions (population models) for each MiniACSIncome dataset.
from miniacsincome import get_population_model, get_network
import torch
pop_model, input_space, input_transform = get_population_model(5)
input_space.input_shape
# torch.Size([40])
input_space.input_bounds
# (tensor([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
# 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.,
# 0., 0., 0., 0.]),
# tensor([ 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
# 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.,
# 1., 1., 1., 1., 1., 1., 99., 1., 1., 1., 1., 1.]))
data = pop_model.sample(100, seed=0).to(torch.float32)
data.shape
# torch.Size([100, 40])
net = get_network(num_variables=5)
net(input_transform(data)).argmax(dim=-1).float().mean()
# tensor(0.2900)
Population Model
The population models are trained in population_model.ipynb.
Each population model is derived from the population model for MiniACSIncome-8.
The marginal distributions of this population model are:
The covariance of the population model matches the covariance of the original dataset reasonably well.
Citation
If you use this dataset in your research, please cite:
@inproceedings{probspec,
author = {David Boetius and Stefan Leue and Tobias Sutter},
title = {Solving Probabilistic Verification Problems of Neural Networks using Branch and Bound},
booktitle = {{ICML}},
series = {Proceedings of Machine Learning Research},
volume = {267},
publisher = {{PMLR}},
year = {2025},
}
Metadata
Release files for miniacsincome 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| miniacsincome-0.0.3.tar.gz | 6.2 kB | Without provenance | Details for miniacsincome-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| miniacsincome-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for miniacsincome-0.0.3-py3-none-any.whl |
Total release size: 13.7 kB
Release files / miniacsincome-0.0.3.tar.gz
| Download URL | miniacsincome-0.0.3.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d31befca6ba4d9fcd0143d0d8a7f5c61751c2a7159baa8be3774cb8e94c3049
|
|
BLAKE2b-256 checksum How to use checksums |
352cc2e1e20ddec6d6d9deb9beed25f493e802f838b271b65e68db5e26e46545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / miniacsincome-0.0.3-py3-none-any.whl
| Download URL | miniacsincome-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45188dd600fd6c0166114f6c40f87f67c11546aaa5873e53299759a42150b495
|
|
BLAKE2b-256 checksum How to use checksums |
e5ac9cb0a58cf72359a69cdf818fca3569dd202f14ada0fb5cd426f83da97560
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for miniacsincome 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.