Skip to content
Back to skills

Fairpfneval

ASecurity

Evaluates a model's ability to mitigate the causal and counterfactual effects of protected attributes on predictions while maintaining predictive accuracy, without requiring explicit causal graph knowledge. Use when the user wants to benchmark on Synthetic Causal Case Studies, Law School Admissions, Adult Census Income, or asks about evaluating this task. Reports Total Causal Effect (TCE/TeE).

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
researchpythonperformance

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill fairpfneval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fairpfneval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fairpfneval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-fairpfneval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-fairpfneval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fairpfneval
description: Evaluates a model's ability to mitigate the causal and counterfactual effects of protected attributes on predictions while maintaining predictive accuracy, without requiring explicit causal graph knowledge. Use when the user wants to benchmark on Synthetic Causal Case Studies, Law School Admissions, Adult Census Income, or asks about evaluating this task. Reports Total Causal Effect (TCE/TeE).
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2407.05732
  bibtex_key: [REDACTED]
  confidence: high
---

# fairpfneval

> FairPFN: Transformers Can do Counterfactual Fairness — Robertson et al. (2024) (arXiv:2407.05732, 2024)

## What this evaluates

Evaluates a model's ability to mitigate the causal and counterfactual effects of protected attributes on predictions while maintaining predictive accuracy, without requiring explicit causal graph knowledge.

## Datasets

- **Synthetic Causal Case Studies** — total ?; splits: test (-1)
- **Law School Admissions** — total ?; splits: test (-1)
- **Adult Census Income** — total ?; splits: test (-1)

## Metrics

- `Total Causal Effect (TCE/TeE)` **(primary)** — range: other
  - Measures the total causal effect of the protected attribute on the prediction, computed using fitted structural causal models.
- `1-AUC` — range: [0, 1]
  - Predictive error calculated as one minus the Area Under the ROC Curve.
- `MAE` — range: other
  - Mean Absolute Error between predictive distributions on real data ($\hat{Y}_{real}$) and counterfactual data ($\hat{Y}_{a\rightarrow a'}$).

## Input / output format

**Input**: Observational feature vectors including protected attributes, provided without explicit causal graph or structural equation knowledge.

**Output**: Predicted values $\hat{Y}$ for real instances and counterfactual predictions $\hat{Y}_{a\rightarrow a'}$ for counterfactual instances.

## Scoring recipe

```python
# Compute predictive error
auc = compute_auc(predictions, ground_truth)
error_1_auc = 1 - auc

# Compute causal effect (TCE/TeE)
scm = fit_scm(data)
tce = compute_total_causal_effect(scm, protected_attribute, predictions)

# Compute counterfactual MAE
mae = mean_absolute_error(predictions_real, predictions_counterfactual)
```

## Common pitfalls

- Assuming the model requires explicit causal graph knowledge during inference (the paper explicitly states it receives no such information).
- Expecting the model to output a random classifier when data is heavily biased; FairPFN retains non-causal noise terms to preserve predictive signal.
- Confusing Total Causal Effect (TCE) with direct or indirect effects; the evaluation focuses on the total effect removal.

## Evidence (verbatim from paper)

> In this section, we evaluate the performance of FairPFN on our benchmark of synthetic and real-world scenarios, with the key message that FairPFN removes the causal and counterfactual effect of protected attributes without any knowledge of the causal model. ... We also evaluate FairPFN on the Law School Admissions and Adult Census Income datasets, using causal models fit to the structures posed in Figure 6 to measure the TeE and MAE. We note again that in evaluation FairPFN receives no information about the causal graphs or models. In Figure 7, we also measure the MAE between the predictive distributions on the real and counterfactual datasets, $\hat{Y}_{real}$ and $\hat{Y}_{a\rightarrow a'}$.

## Citation

```bibtex
@misc{robertson2024fairpf,
  title={FairPFN: Transformers Can do Counterfactual Fairness},
  author={Robertson et al. (2024)},
  year={2024},
  note={arXiv:2407.05732}
}
```

- arXiv: 2407.05732

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.