Pith. sign in

REVIEW 3 major objections 5 minor 7 references

FairML: A Julia Package for Fair Classification

T0 review · 3 major / 5 minor · reviewed 2026-08-12 · deepseek-v4-flash

Pith's one-line read FairML.jl packages fair classification as three stages — data resampling, constrained fitting, and cut-off choice — and its simulations show each stage, and their combinations, reduce disparate impact and disparate mistreatment.

desk verdict FairML.jl is a useful Julia package with a real mixed-effects gap to fill, but the 1% training split in the simulations guts the empirical claims. read the letter →

arxiv 2412.01585 v3 pith:LZYXJ6II submitted 2024-12-02 cs.LG math.OC

classification cs.LGmath.OC
keywords fairclassificationJuliapackagedisparateimpactmistreatmentmixed-effectsmodelsconstrainedoptimizationresamplingcut-offselection
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

FairML.jl is a Julia package that delivers fair classification as a three-stage pipeline: a resampling step that balances training data across sensitive groups and labels, an in-processing step that embeds fairness constraints directly into logistic-regression and support-vector-machine optimization, and a post-processing step that chooses a classification cut-off favoring the user's fairness metric. The paper claims each stage reduces the unfairness it targets — disparate impact (unequal rates of positive prediction across sensitive groups) or disparate mistreatment (unequal misclassification rates across sensitive groups) — and that combining the in-processing and post-processing stages beats either alone. Its distinctive contribution is an extension of the fairness constraints to mixed-effects models, so that classifiers for grouped data, as from surveys or clinical studies, can also be made fair. The claims rest on extensive simulations with synthetic data, for both ordinary and grouped-data settings.

What carries the argument

The load-bearing object is the family of fairness constraints of Zafar et al. (2017), adapted to the package's objectives. For disparate impact, the constraint bounds the empirical covariance $n^{-1}\sum_{\ell}(s_\ell-\bar{s})\beta^{\top}x_\ell$ between the sensitive feature and the decision score; for disparate mistreatment, it balances false-negative and false-positive rates across sensitive groups using sums of $\min(0,\beta^{\top}x_\ell)$ over the true-positive and true-negative subsets, each bounded by a tolerance $c$. The paper's mixed-effects extension replaces the score $\beta^{\top}x_{ij}$ with $\beta^{\top}x_{ij}+g_i$ inside every constraint. Around this core, the preprocessing stage resamples each sensitive-by-label cell down to the size of the smallest cell, with replacement and repeated $R$ times, keeping the run with the best fairness on the full training set, and the post-processing stage searches cut-offs from 0.01 to 0.99, picking the value that maximizes accuracy minus the fairness metric among those costing no more than 5% accuracy relative to the 0.5 cut-off.

What would settle it

Fit the mixed-effects fair logistic regression or support-vector machine on synthetic grouped data with about 100 groups, random-effect variance comparable to the fixed effects, and sensitive-attribute prevalence varying across groups; then evaluate disparate impact and disparate mistreatment on a large held-out test set. If the attained metrics are no better than those of an unconstrained mixed model across most simulation runs, then the mixed-effects constraints do not enforce fairness in the population.

Watch

Extended reading notes

Core claim

The central claim is that fairness in classification can be engineered at three independent points and that the three stages reinforce one another. The in-processing stage is the heart of the package: logistic regression and support-vector machines are reformulated as constrained optimization problems whose constraints enforce disparate-impact balance, through a bound on the covariance between the sensitive attribute and the decision score, or disparate-mistreatment balance, through equalized false-positive and false-negative rates built from $\min(0,\cdot)$ terms that isolate misclassified points, with a user-set tolerance $c$ mediating the accuracy–fairness trade-off. The paper's new step is to insert a group-level random effect $g_i$ into the decision score inside every constraint, yielding eight mixed-effects fair classification problems. Synthetic-data simulations show each phase improves the metric it targets, and the combined in-processing-plus-post-processing pipeline outperforms each stage on its own.

Load-bearing premise

The package's headline novelty — fairness constraints for mixed-effects models — rests on the assumption that inserting a group-level random effect into the fairness constraints preserves the fairness guarantees, a step the paper asserts by analogy to an earlier paper rather than proves.

Editorial extensions

If this is right

  • A user can target a specific fairness complaint — disparate impact, false-positive-rate disparity, false-negative-rate disparity, or disparate mistreatment — by choosing the corresponding in-processing constraints, in both regular and mixed-effects models.
  • Because the preprocessing resampling also lowers fairness metrics beyond the disparate impact it was designed for, it can serve as a generic fairness booster ahead of any classifier the package accepts, including user-supplied ones.
  • For grouped data, the mixed-effects fair logistic regression and support-vector machine are the package's main new contribution, since existing fair-classification packages do not handle random effects.
  • Combining the in-processing and post-processing stages yields superior fairness outcomes in the simulations, which is why the paper recommends running both together.
  • The post-processing cut-off search works with any fairness metric in the package and costs at most five percent accuracy by construction, so it is a low-risk add-on to any fitted classifier.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The mixed-effects constraints are asserted by substitution, putting $g_i$ into the linear predictor of the Zafar constraints, rather than derived, so whether the fairness guarantee survives at the population level is not established; a natural check is to use these constraints where group sizes and random-effect variance are extreme and the sensitive attribute is unevenly distributed across groups
  • Preprocessing is disabled for mixed models precisely because down-sampling can empty small groups; a weighting-based or synthetic-resampling preprocessing would let clustered data benefit from a preprocessing stage as well.
  • The post-processing rule of maximizing $\mathrm{AC}_v - fm_v$ subject to a five-percent accuracy cap is a heuristic; the same machinery could be recast as an explicit accuracy–fairness Pareto frontier.
Share X Bluesky LinkedIn Reddit HN

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. The manuscript presents FairML.jl, a Julia package that unifies three stages of fair classification: a preprocessing resampling method to reduce disparate impact, in-processing constrained optimization for logistic regression and SVM (including mixed-effects extensions), and a post-processing cut-off selection method. The authors report simulation studies on synthetic data, with and without group structure, showing improvements in disparate impact (DI) and disparate mistreatment (DM), and argue that combining in-processing and post-processing yields superior results. The paper also describes the package interface and documents hyperparameters.

Significance. The package fills a gap in the Julia ecosystem, and the mixed-effects extension is a distinctive feature relative to existing Python and R fair-ML packages. The paper provides a clear statement of the package's interface and documents hyperparameters, which lowers the barrier for practitioners. However, the central claim of effective unfairness reduction rests on synthetic-only simulations with a highly unusual 1% training split; without stronger empirical validation and a derivation of the mixed-effects constraints, the significance is not yet established. If these are addressed, the package could be a useful contribution to the fair-ML toolset.

major comments (3)
  1. [Section 6, 'Train-Test split'] The empirical claim that FairML reduces DI and DM, including the statement in Section 6 that 'utilizing both strategies in conjunction yields superior outcomes compared to employing either in-processing or post-processing alone,' rests on simulations that use approximately 1% of the dataset for training and 99% for testing. With such a tiny training sample, the coefficients and random effects are estimated from very few observations, fairness constraints can be satisfied by chance, and the metrics on the 99% held-out set are noisy. The manuscript does not report the absolute dataset size, so the actual training n is unknown. This concern is load-bearing because all headline results are based on these experiments. The authors should rerun the experiments with standard splits (e.g., 70/30 or repeated cross-validation), report dataset sizes, and show that the fairness improvements are stable.
  2. [Section 4, 'Mixed Model'] The mixed-effects fairness constraints are introduced by replacing β⊤xℓ with β⊤xij + g_i in the Zafar et al. constraints (Equations (5)–(8)), with no derivation. The paper cites Burgard and Pamplona (2024b) for 'a similar construction,' but the population-level fairness properties of this substitution are not demonstrated. Since the mixed-effects models are the paper's main novelty relative to existing fair-ML packages, the authors should either provide a derivation showing that these constraints control DI and DM in the presence of random effects, or include a formal statement of the conditions under which they do so. As written, a reader cannot verify that the mixed-effects fair classifiers actually deliver fair classifications.
  3. [Section 6, 'Numerical Results'] All numerical validation is performed on synthetic data generated by the authors using the same model class (logistic/SVM with the same prediction functions and random effects). This creates a circularity risk: the experiments can confirm that the solver works on data that exactly matches the model assumptions, but they do not demonstrate performance on real-world data with unknown structure. The authors should add at least one or two real benchmark datasets (e.g., UCI Adult, COMPAS, or similar) to validate the package's practical utility, or clearly state this as a limitation and temper the corresponding claims.
minor comments (5)
  1. [Section 6.1] The phrase 'the β's = [−2.0; 0.4; 0.8; 0.5; 2.0]' mixes notation; use a consistent vector notation and clarify whether β4 corresponds to the sensitive feature in both regular and mixed settings.
  2. [Abstract and Section 1] The phrase 'The in-processing phase consist of' should be 'consists of.'
  3. [Section 5] The selection rule B = argmax_v(AC_v − f m_v) is not accompanied by an explanation of why subtracting the fairness metric (where lower is better) is the correct criterion; a brief justification would help.
  4. [Section 6] The figures are described in the text but not visible in the manuscript; ensure the final version includes readable box plots with labeled axes and legends, and report the exact quantiles plotted.
  5. [Section 7] The sentence 'we proposeFairML.jl a Julia package' is missing a comma or definite article.

Circularity Check

0 steps flagged · score 2.0 of 10

No significant circularity: the package's three stages are implemented and tested as stated, and the mixed-effects constraints, though referenced to the authors' own prior work, are written out explicitly rather than smuggled in as a definitional prediction.

full rationale

Walking the derivation chain, I find no step in which a 'prediction' or 'first-principles result' is equivalent to its own input by construction. The Zafar et al. (2017) constraints are external prior work; the mixed-effects adaptation in Section 4 is stated in full equations and described as following the same logic as the fixed-effects case, with Burgard and Pamplona (2024a,b) cited for detailed derivations. This is a self-citation, and it is the main novelty of the package, but the present paper does not reduce its empirical claim to that citation: the constraints are displayed, the optimization problems are explicit, and the package code is the artifact under study. The numerical validation uses synthetic data generated from the same model class, which limits external benchmarking, and the reported 1% training split is a serious statistical robustness concern, but neither constitutes circularity: the test metrics are computed out-of-sample after fitting on the small training set, so the reported DI/DM reductions are not forced by construction. No fitted parameter is renamed as a prediction, and no uniqueness theorem from the authors is imported to forbid alternatives. Accordingly, the appropriate finding is minor self-citation that is not load-bearing, not meaningful circularity.

Assumptions & free parameters 6 free parameters · 6 assumptions · 0 invented entities

The central claim rests on several domain assumptions: the validity of the Zafar covariance constraints, the soundness of extending them by adding random effects, the heuristic effectiveness of the resampling preprocessor, and the appropriateness of the synthetic-data evaluation. The paper contributes no new theoretical entities; its main reliance is on prior work, much of it self-cited.

free parameters (6)
  • c (fairness slack) = 0.1 (default and used in all experiments)
    User-set threshold in constraints (5), (7), (8) and their mixed-effects analogues; controls trade-off between accuracy and fairness. Not fitted to data but chosen by hand; results depend on it.
  • R (preprocessing repetitions) = 1 or 5
    Number of resampled datasets generated in preprocessing; the best is selected on the full training set. Experiments use 1 and 5.
  • Post-processing accuracy drop threshold = 5%
    Values of the cutoff v are accepted only if accuracy stays within 5% of the v=0.5 accuracy. 'The value of 5% was determined through preliminary tests' (Section 5).
  • lambda (random-effects penalty) = not reported
    Penalty on sum of squared group effects in (MELR) and (MESVM); 'all unspecified hyperparameters were obtained through cross-validation' (Section 6).
  • mu (SVM misclassification penalty) = not reported
    Penalty on slack variables in (SVM) and (MESVM); obtained via cross-validation, value not stated in the paper.
  • Synthetic data beta and random effects parameters = beta = [-2, 0.4, 0.8, 0.5, 2] or [-4, 0.4, 0.8, 0.5, 4]; g ~ N(0, 3)
    Hand-chosen simulation parameters defining the data-generating process; the evaluation of the package is conditional on these choices and on the model family matching the learner.
assumptions (6)
  • domain assumption Zafar et al. (2017) covariance constraints (5) approximate disparate impact.
    The paper adopts these constraints without re-derivation; they are known to be a linear relaxation of the disparate impact condition.
  • domain assumption Adding the random effect g_i inside the fairness constraints preserves their fairness semantics.
    Section 4 states the mixed-effects constraints 'following the same logic as presented before' with the substitution beta^T x + g_i, and cites Burgard and Pamplona (2024b) for the derivation, which is not included in this paper.
  • domain assumption Balancing the four (s,y) subsets in preprocessing yields a classifier with lower disparate impact.
    Section 3 gives a heuristic argument ('since there is no disproportionality... we expected') and reports simulations; no formal guarantee is provided.
  • domain assumption Synthetic data generated with the same model family as the learner is a valid test of the methods.
    Section 6 generates labels using prediction functions (3) and (4), which are the same functions the package fits; this assumes the model is correctly specified.
  • domain assumption A cutoff chosen on the training set generalizes to the test set.
    Section 5 selects B using training-set accuracy and fairness, then applies it to newdata without further validation.
  • domain assumption Random effects follow a zero-mean normal distribution.
    The package assumes g_i ~ N(0, sigma^2) for mixed effects; this is a standard mixed-model assumption but is not tested in the paper.

how reviews work

0 comments
Cite this review

Pith. "Pith review of FairML: A Julia Package for Fair Classification." pith.science (2026). https://pith.science/paper/LZYXJ6II

@misc{pith2026241201585,
  author       = {Pith},
  title        = {Pith review of: FairML: A Julia Package for Fair Classification},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/LZYXJ6II}},
  note         = {Machine review of arXiv:2412.01585}
}
read the original abstract

In this paper, we propose FairML.jl, a Julia package providing a framework for fair classification in machine learning. In this framework, the fair learning process is divided into three stages. Each stage aims to reduce unfairness, such as disparate impact and disparate mistreatment, in the final prediction. For the preprocessing stage, we present a resampling method that addresses unfairness coming from data imbalances. The in-processing phase consist of a classification method. This can be either one coming from the MLJ.jl package, or a user defined one. For this phase, we incorporate fair ML methods that can handle unfairness to a certain degree through their optimization process. In the post-processing, we discuss the choice of the cut-off value for fair prediction. With simulations, we show the performance of the single phases and their combinations.

Figures

Figures reproduced from arXiv: 2412.01585 by the authors.

Figure 1
Figure 1. Preprocessing results: First row: Comparison for logistic regression. Second row: Comparison for support vector machine. Left: Without preprocessing. Right: With preprocessing (R=1) As can be seen in [PITH_FULL_IMAGE:figures/full_fig_p016_1.png] view at source ↗
Figure 2
Figure 2. Preprocessing with multiple runs (R=5): Left: Logistic regression. Right: Support vector machine. It can be observed from [PITH_FULL_IMAGE:figures/full_fig_p016_2.png] view at source ↗
Figure 3
Figure 3. In-processing results: First row: Comparison for logistic regression. Second row: Comparison for support vector machine. Left: Disparate impact. Right: Disparate mistreatment. In this set of tests, we can verify that, when compared to tests without fairness constraints, in Figures 1, the fair optimization problems effectively reduced the fairness metrics they are designed to mitigate. I.e., when using the optimizati… view at source ↗
Figures from the paper (5 more)
Figure 4
Figure 4. Figure 4: Post-processing results for disparate impact: First row: Com￾parison for logistic regression. Second row: Comparison for support vector machine. Left: Only post-processing. Right: In-processing and post-processing. AC DI FNR FPR TNR TPR DM 0 0.2 0.4 0.6 0.8 1 AC DI FNR…
Figure 5
Figure 5. Figure 5: Post-processing results for disparate mistreatment: First row: Comparison for logistic regression. Second row: Comparison for support vector machine. Left: Only post-processing. Right: In-processing and post-processing. The post-processing phase can be utilized indepen…
Figure 6
Figure 6. Figure 6: In-processing results in Mixed models: Left: Comparison for logistic regression. Right: Comparison for support vector machine. First row: No fairness constraints. Second row: Disparate impact constraints. Third row: Disparate mistreatment constraints [PITH_FULL_IMAGE:…
Figure 7
Figure 7. Figure 7: Post-processing results in mixed models for disparate impact: First row: Comparison for logistic regression. Second row: Comparison for support vector machine. Left: Only post-processing. Right: In￾processing and post-processing. Just as in post-processing tests for re…
Figure 8
Figure 8. Figure 8: Post-processing results in mixed models for disparate mis￾treatment: First row: Comparison for logistic regression. Second row: Comparison for support vector machine. Left: Only post-processing. Right: In-processing and post-processing. 7. Conclusion In this work we pr…

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

7 extracted references · 6 canonical work pages

  1. [1]

    Learning Optimal and Fair Decision Trees for Non-Discriminative Decision-Making

    Aghaei, S, M. J. Azizi, and P Vayanos (2019). “Learning Optimal and Fair Decision Trees for Non-Discriminative Decision-Making.” In:CoRR abs/1903.10598. arXiv: 1903.10598. url: http://arxiv.org/abs/1903.10598. Agrawal, A, J Chen, S Vollmer, and A Blaom (Aug. 2020).ashryaagr/Fairness.jl. Version v0.1.2. doi: 10.5281/zenodo.3977197 . url: https://doi.org/10...

  2. [9]

    FairGBM: Gradient Boosting with Fairness Constraints

    Caton, S and C Haas (2020). “Fairness in machine learning: A survey.” In:ACM Computing Surveys. Cheong, K. C., A. F. Yusoff, S. M. Ghazali, K. H. Lim, S Selvarajah, J Haniff, G. L. Khor, S Shahar, R. J. Abd, A. A. Zainuddin, et al. (2013). “Optimal BMI cut-off values for predicting diabetes, hypertension and hypercholesterolaemia in a multi-ethnic populat...

  3. [10]

    Joint use of over-and under-sampling techniques and cross-validation for the development and assessment of prediction models

    1137/14100067. Blagus, R and L Lusa (2015). “Joint use of over-and under-sampling techniques and cross-validation for the development and assessment of prediction models.” In: BMC bioinformatics 16, pp. 1–10. Bono, R, R Alarcón, and M. J. Blanca (2021). “Report Quality of Generalized Linear Mixed Models in Psychology: A Systematic Review.” In:Frontiers in...

  4. [12]

    DataFrames.jl: Flexible and Fast Tabular Data in Julia

    doi: 10.3389/fpsyg.2021.666182. Bouchet-Valat, M and B Kamiński (2023). “DataFrames.jl: Flexible and Fast Tabular Data in Julia.” In:Journal of Statistical Software107.4, pp. 1–32.doi: 10.18637/ jss.v107.i04. Browne, M. W. (2000). “Cross-validation methods.” In:Journal of mathematical psychology 44.1, pp. 108–132. Burgard, J. P. and J. V. Pamplona (2024a)...

  5. [28]

    Aequitas Flow: Streamlining Fair ML Experimentation

    Hsieh, C. J., K Chang, and C. J. Lin (Jan. 2008). “A dual coordinate descent method for large-scale linear SVM.” In:Proceedings of the Twenty-fifth International Conference on Machine Learning, pp. 1369–1398. Jesus, S, P Saleiro, B. M. Jorge, R. P. Ribeiro, J Gama, P Bizarro, R Ghani, et al. (2024). “Aequitas Flow: Streamlining Fair ML Experimentation.” I...

  6. [671]

    A convex framework for fair regression

    Berk, R, H Heidari, S Jabbari, M Joseph, M Kearns, J Morgenstern, S Neel, and A Roth (2017). “A convex framework for fair regression.” In:arXiv preprint arXiv:1706.02409. Berman, E and J Ginesin (2024). “The State of Julia for Scientific Machine Learning.” In: arXiv preprint arXiv:2410.10908. Besançon, M, T Papamarkou, D Anthoff, A Arslan, S Byrne, D Lin,...

  7. [970]

    FARF: A Fair and Adaptive Random Forests Classifier

    26 REFERENCES Zafar, M. B., I Valera, M Gomez-Rodriguez, and K. P. Gummadi (2019). “Fairness Constraints: A Flexible Approach for Fair Classification.” In:Journal of Machine Learning Research20.75, pp. 1–42. Zhang, W, A Bifet, X Zhang, J. C. Weiss, and W Nejdl (2021). “FARF: A Fair and Adaptive Random Forests Classifier.” In:CoRR abs/2108.07403. arXiv: 21...

Pith tools

Reviewed August 12, 2026 · model on record in the stance chip above.