When a small lab fine-tunes a large vision model for medical diagnosis, it usually wants two things: good accuracy, and no demographic group left far behind. The methods that enforce the second requirement as a hard rule, such as "no group's accuracy may fall more than 2 points below average," do so by adding one penalty weight per group. The training loop adjusts each weight automatically: it rises while the rule is broken and falls once the rule holds. These methods work on the data they train on. On new patients, the rule breaks again. The one method in this literature that reliably closes the gap on held-out data, FairTune, does it by retraining the model dozens of times to search for which parts to fine-tune. That costs tens of GPU-hours, which erases the reason for using cheap fine-tuning in the first place.
This proposal targets that mismatch. We fine-tune with LoRA (low-rank adaptation: the backbone stays frozen and only small added weight matrices are trained). We enforce fairness as a hard constraint, but the per-group penalty weights are set from data the adapter never trains on. To avoid wasting scarce minority-group examples, two data folds swap roles. Each adapter trains on one fold, while its penalty weights are driven by fairness violations measured on the other. We call this "cross-fitting." Only a handful of numbers per step (one per group) pass from the held-out fold into training, so the adapter cannot memorize its way into looking fair. The claim is that this single training run delivers the held-out fairness that FairTune buys with a search, at roughly the cost of one ordinary LoRA run.
Core Claim
We make two testable claims. First, the gap between fairness on training data and fairness on test data, which prior constrained methods leave open, comes mainly from the adapter overfitting to the constraint, not from noise in the test estimate. It can be closed by measuring violations on held-out data, and cross-fitting keeps that cheap. Second, when the constraint is measured on training data, this gap should grow with the number of trainable parameters. More capacity makes it easier to satisfy the constraint by memorizing individual examples. With held-out measurement, the gap should stay roughly flat. If both hold, the method matches a search-based approach's worst-group performance at a small fraction of its compute. The second claim also explains why earlier findings seem to disagree about whether restricting capacity helps fairness.
Where This Sits
Two papers supply the method. Balancing Act bounds each group's excess accuracy drop during fine-tuning of pruned networks, a process in which most weights are removed. Its trick handles the fact that accuracy has no gradient. The model's weights are updated using an ordinary loss, while the per-group penalty weights (called Lagrange multipliers or "dual variables") are updated using measured accuracy. We reuse this split, implemented in the Cooper library (balancing-act code). The difference is where the accuracy is measured, and that we apply it to LoRA matrices rather than sparsity masks.
Two sources motivate the gap. Balancing Act itself reports that its excess gap is "near zero on the training data" but widens on test data. The stochastic approximation benchmark finds the same train-to-test widening for SSL-ALM (an augmented-Lagrangian method, its best-performing optimizer) and for its other constrained optimizers on full-rank tabular networks.
FairTune is the closest competitor. It searches over which vision-transformer blocks to fine-tune, using a Bayesian optimizer that maximizes validation worst-group AUROC. It works, but it is a search, not a constrained optimization, and it reports 48 GPU-hours on Fitzpatrick17k. Our method uses held-out data inside a single run instead of across many.
Two other LoRA fairness methods use soft penalties with no tolerance guarantee. FairNet trains a contrastive conditional LoRA, and Fairness-Aware Low-Rank Representation Fine-Tuning uses orthogonality and entropy penalties. Both are complementary rather than competing mechanisms.
One paper constrains the design. On the Impact of Random Seeds shows that validation fairness correlates weakly or not at all with test fairness under small samples. If held-out estimates were that noisy for our purposes, the method would fail. We address this directly below rather than assuming it away.
Finally, On Fairness of Low-Rank Adaptation finds that LoRA rank barely affects fairness in unconstrained training. Our second claim concerns constrained training, where capacity determines how easily the constraint can be satisfied by memorization, so the two findings need not conflict. Our rank sweep tests exactly this.
Method
Let $\theta$ denote the LoRA matrices. Let $G$ be the demographic groups. Let $\mathcal{L}_A$ be the cross-entropy on fold $A$. Let $\ell_{A,g}(\theta)$ be group $g$'s average loss on fold $A$, a differentiable stand-in for its accuracy. Let $\Delta_{B,g}(\theta)$ be group $g$'s excess accuracy drop measured on fold $B$, meaning overall accuracy minus group accuracy. Let $\epsilon$ be the user's tolerance. The adapter trained on fold $A$ takes gradient steps on
$$\mathcal{L}_A(\theta) + \sum_{g \in G} \lambda_g \,\big(\ell_{A,g}(\theta) - \bar\ell_A(\theta)\big),$$
where $\bar\ell_A$ is the average of the group losses. The penalty weights are updated from the other fold:
$$\lambda_g \leftarrow \max\big(0,\; \lambda_g + \eta\,(\hat\Delta_{B,g}(\theta) - \epsilon)\big).$$
Here $\eta$ is a step size, and $\hat\Delta_{B,g}$ is a moving average over a replay buffer of fold-$B$ predictions, as in Balancing Act. The replay buffer and averaging over steps are what make small held-out groups usable. The penalty weights respond to a violation accumulated over hundreds of steps, not to a single noisy validation number. That is the regime where the random-seeds result does not directly apply, and we measure whether this reasoning holds.
A second adapter runs with the fold roles reversed. At inference we average the two adapters' logits, which costs one extra low-rank pass. A third, untouched split serves as the test set.
We also test a "no-harm" variant. It adds constraints that no group's held-out accuracy falls below its unconstrained-LoRA value, so the method cannot meet $\epsilon$ simply by lowering majority accuracy.
Baselines
The naive reference points are full fine-tuning and vanilla LoRA with cross-entropy on the pooled training data. Full fine-tuning anchors the comparison to FairTune's reported numbers. Vanilla LoRA isolates what the constraint adds.
The strongest existing method is FairTune. On the file's benchmarks it reports average disadvantaged-subgroup AUROC of 83.1% versus 76.7% for full fine-tuning across seven medical datasets, and a HAM10000 age gap of 4.9% versus 9.1%, with 48 GPU-hours of search on Fitzpatrick17k. We rerun FairTune's released search on the same ViT-B backbone, splits, and seeds. We report it at its native budget, and also truncated to the same GPU-hours our method uses. Beating it means matching or exceeding its disadvantaged-group AUROC and test gap at a matched budget, or matching it at its native budget while using at least five times less compute. Either result supports the claim. Merely matching it at equal compute would not.
The most important ablation is Balancing Act's method applied directly to LoRA, with the penalty weights driven by training-set accuracy. It is identical to our method except for where violations are measured, so it isolates the key ingredient. A second ablation holds out a single fixed split with no cross-fitting. It tells us whether cross-fitting's recovery of minority data matters.
As a stronger constrained optimizer, we run SSL-ALM from the stochastic approximation suite over the same LoRA parameters with training-set violations. On CelebA, as a secondary check on vision data, we compare against FairNet's reported worst-group accuracy of 88.2%, versus 77.9% for ERM (empirical risk minimization, i.e. plain average-loss training), at overall accuracy of 95.9%.
All methods get the same backbone, the same data, and a stated GPU-hour ceiling. Every method's tunable hyperparameters, including our $\eta$ and the baselines' penalty weights, are selected with an equal budget of trials. Our tolerance $\epsilon$ is fixed in advance by the user, not tuned.
Why not just…?
Why not just run Balancing Act's method on LoRA parameters? This is the obvious port and the direct ablation. Balancing Act's own report that the gap widens from near zero on training data to substantially larger on test data predicts it will fail in the same way here. If training-set penalty weights on LoRA already generalize, because low rank alone limits memorization, our first claim is false. We would say so and report the rank sweep as the finding instead.
Why not just tune a soft penalty weight on validation data? This is a real threat, because it is essentially a cheap one-dimensional version of FairTune. The F-Layer paper reports that penalty methods often fail to meet constraints at low weights. The benchmark finds that augmented-Lagrangian methods beat the Fairret regularizer. Neither result tested LoRA or matched compute. We run a validation grid over the penalty weight, with a trial count chosen so its total cost equals roughly two of our runs, and report both methods against the same test gap. If the grid ties us, the contribution shrinks to "one run instead of several," and we will state it that way.
Why not just adjust group thresholds after training, or append a fairness projection layer? Woodworth et al. argue that post-hoc correction cannot recover features the model never learned. The F-Layer reports a 1.46% mean AUC gain over post-hoc projection on SBA loans. However, per-group thresholds fitted on validation data are cheap and could close accuracy gaps on these tasks. We therefore include per-group thresholds fitted on the held-out fold of vanilla LoRA as a baseline. We win only if we achieve a lower test gap at equal or higher worst-group AUROC, which thresholds cannot improve, since AUROC does not depend on where the threshold is set.
Why not just pick the fairest seed on validation? On the Impact of Random Seeds shows a nearly 15% spread in $\Delta$AUC for Asian patients on MIMIC-III at a fixed overall AUC of about 0.8, with validation fairness weakly or not at all correlated with test fairness. We still run a compute-matched best-of-seeds baseline. We also report, per method, the rank correlation between validation and test gap across seeds. This directly measures whether our time-averaged held-out signal escapes the problem that plain validation selection suffers from.
Proposed Experiments
We use HAM10000 and Fitzpatrick17k (skin conditions, grouped by age, sex, and skin type) and Harvard-GF (glaucoma). On Harvard-GF, FairSDE reports average AUC of 81.2 versus 80.54 for ERM and a group gap of 1.81 using multiple full expert models. We also use CheXpert split by race and sex, where Mirza et al. report about 81.4 AUC with worse outcomes for female and minority patients. No FairTune result on CheXpert was found on Lacuna. CelebA is a non-medical check.
We report overall AUROC, worst-group AUROC, test excess accuracy gap, the fraction of groups violating $\epsilon$ on test data, and each group's change from vanilla LoRA, which detects leveling down. We also report total GPU-hours including all tuning, and FairLib's distance-to-optimal score (FairLib). All results use five seeds.
The first decisive check is the rank sweep. We use LoRA ranks 1 through 64 plus full fine-tuning, each under training-set and cross-fitted penalty weights, and plot the train-to-test violation gap against trainable-parameter count. Our second claim predicts a rising curve for training-set weights and a flat one for cross-fitted weights. A flat curve for both would refute the capacity-overfitting explanation.
The second check is the compute-matched comparison with FairTune on HAM10000 and Fitzpatrick17k.
The third varies how many minority-group examples appear in the held-out fold, by subsampling down to about 20 per group. This locates the point where held-out estimates become too noisy for the penalty-weight updates, the failure the random-seeds paper warns about. It shows practitioners the minimum group size at which the method can be trusted.
References
- Balancing Act: Constraining Disparate Impact in Sparse Models
- Benchmarking Stochastic Approximation Algorithms for Fairness-Constrained Training of Deep Neural Networks
- FairTune: Optimizing Parameter Efficient Fine Tuning for Fairness in Medical Image Analysis
- FairNet: Dynamic Fairness Correction without Performance Loss via Contrastive Conditional LoRA
- Fairness-Aware Low-Rank Representation Fine-Tuning
- On the Impact of Random Seeds on the Fairness of Clinical Classifiers
- On Fairness of Low-Rank Adaptation of Large Models
- Differentiable Optimization Layers for Guaranteed Fairness in Deep Learning
- Learning Non-Discriminatory Predictors
- Achieving Fairness Without Harm via Selective Demographic Experts
- How Fair are Medical Imaging Foundation Models?
- FairLib: A Unified Framework for Assessing and Improving Fairness