yakew7 / yakew7/Fair-Code

Explainer: What Is Distributionally Robust Optimization (DRO) for Fairness?

Open
#544 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation help wanted
Dominant language
HTML
Stars
47
Forks
45
Avg merge
1h 57m
Merged PRs (30d)
95

Description

Add explainers/distributionally-robust-optimization.md.

None of this repo's 56 explainers cover Distributionally Robust Optimization (DRO) as a fairness in-processing technique. Mitigation Strategies already covers this repo's own S3 in-processing strategy (Fairlearn's ExponentiatedGradient, a constraint-based approach: optimize accuracy subject to a fairness constraint like demographic parity). DRO is a genuinely different in-processing philosophy worth its own explainer: instead of constraining to a specific fairness metric, train the model to minimize its worst-case loss over an uncertainty set of possible subgroup distributions - without needing to know group membership as a hard constraint, and without targeting one specific parity metric at all.

Suggested structure (match mitigation-strategies.md's in-processing section, as its own dedicated explainer): one-sentence definition -> why it matters (a constraint-based method like ExponentiatedGradient needs the fairness metric decided up front and group membership at training time; DRO instead hedges against the worst subgroup the training data might be under-representing, which can help even when the actual harmful subgroup isn't the one you thought to check) -> core concept (the min-max objective: minimize the maximum expected loss over a distribution-shift ball around the empirical training distribution, contrasted directly against ExponentiatedGradient's constrained-optimization objective already described in mitigation-strategies.md) -> a concrete example - implement a simple group-DRO training loop (upweighting whichever group currently has the highest loss during training, a standard simplified DRO approach) against one of this repo's real audits, and compare the resulting per-group performance against this repo's own frozen S0/S3 baseline numbers, with real code and real (not invented) results -> detection/implementation code -> limitations (DRO's uncertainty set size is a free parameter - too large and the model over-hedges against implausible worst cases, hurting average-case accuracy for no real benefit; still needs group labels during training even though it doesn't optimize a specific parity metric) -> related concepts (mitigation-strategies, fairness-accuracy-tradeoff, class-imbalance) and projects.

Related: mitigation-strategies, fairness-accuracy-tradeoff, class-imbalance.

Key citation to verify and use: Sagawa, Koh, Hashimoto, Liang (2020), "Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalization" (ICLR) - confirm the exact venue/year/finding yourself before citing, don't trust this issue's paraphrase.

See CONTRIBUTING.md: add explainers/<slug>.md plus a one-line entry in assets/explainers-data.json; the build script generates the page. Per CLAUDE.md, the paper freeze is lifted - if you quote a Fair Code benchmark result, use the current numbers in results/ (or paper/results-frozen/ for the earlier reference snapshot) and say which one.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with explainers/mitigation-strategies.md, CONTRIBUTING.md, and CLAUDE.md, then inspect the current baseline numbers in results/ or paper/results-frozen/. Add explainers/distributionally-robust-optimization.md with verified citation details, a real group-DRO audit comparison, limitations, and related links, plus one entry in assets/explainers-data.json. Done means the explainer builds successfully and reports reproducible, clearly sourced results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.