Most modern machine learning models are trained using gradient descent, a process that requires a smooth, continuous "landscape" to navigate. By following the steepest slope of a loss function, an algorithm eventually finds a set of weights that minimizes error. However, when we try to bake fairness into this process, we run into a fundamental mathematical wall: fairness is often discrete.
Whether we are measuring Demographic Parity (ensuring equal selection rates) or Equalized Odds (ensuring equal error rates), these metrics rely on counting people or outcomes. In the language of calculus, these are "step functions"—flat plateaus separated by sudden jumps. Because these functions have no meaningful slope (their derivative is zero almost everywhere), standard gradient-based optimization cannot "see" how to adjust model weights to improve fairness.
To solve this, researchers are developing a toolkit of differentiable surrogates and optimization frameworks that bridge the gap between discrete social goals and continuous mathematical solvers.
The Differentiability Gap
The core conflict in algorithmic fairness is the surrogate-fairness gap. As Wei Yao and colleagues point out in Understanding Fairness Surrogate Functions in Algorithmic Fairness, there is a persistent discrepancy between the non-differentiable metrics we care about (like binary acceptance rates) and the smooth functions we use to optimize them.
When Yahav Bechavod proposed Penalizing Unfairness in Binary Classification, the primary challenge was that false positive and false negative rates are not naturally differentiable. Without a continuous proxy, a model cannot effectively minimize unfairness during the learning process. This problem extends beyond simple classification; in recommender systems, Jaewoong Cho and Changho Suh note that discrete preference predictions make it difficult to balance accuracy with diverse user experiences Equal Experience in Recommender Systems.
Smoothing the Landscape with Surrogates
The most common strategy for overcoming this wall is to replace discrete indicators with smooth approximations.
- Kernel Density Estimation (KDE): In A Fair Classifier Using Kernel Density Estimation, Jaewoong Cho demonstrates how KDE can estimate probability distributions of model outputs. This transforms "hard" counts into "soft" densities, providing the smooth gradients necessary for stochastic gradient descent.
- Sigmoid and Cross-Entropy Proxies: Algorithms like FairGBM, developed by André F Cruz and Catarina G Belém, use smooth cross-entropy surrogates to bring fairness constraints to Gradient Boosted Decision Trees FairGBM: Gradient Boosting with Fairness Constraints. Similarly, Wei Yao introduced the General Sigmoid Surrogate to mitigate the destabilizing effect of outliers during training.
- Optimal Transport: To enforce fairness across entire distributions, researchers like Alberto Gonzalez Sanz and Jean-Michel Loubes utilize Wasserstein distances. By using Gâteaux derivatives, they make these complex distributional distances differentiable, allowing for fairness regularization even in high-dimensional image data Using Wasserstein-2 regularization to ensure fair decisions with Neural-Network classifiers.
Taming the Max-Min Objective
A particularly difficult flavor of fairness is Max-Min fairness (or Rawlsian fairness), which seeks to maximize the utility of the worst-off group. The "minimum" operator is notoriously non-smooth; a tiny change in one group's performance might suddenly make a different group the "minimum," causing the gradient to jump discontinuously.
In the realm of Multi-Objective Reinforcement Learning (MORL), Giseung Park and Youngchul Sung addressed this by transforming the max-min objective into a dual convex optimization problem regularized with entropy The Max-Min Formulation of Multi-Objective Reinforcement Learning: From Theory to a Model-Free Algorithm. More recently, Woohyeon Byeon and Giseung Park reformulated this as a two-player zero-sum game, enabling stable, "last-iterate" convergence without the memory overhead of previous methods Multi-Objective Reinforcement Learning with Max-Min Criterion: A Game-Theoretic Approach.
Beyond Simple Gradients
When surrogates aren't enough, researchers look to alternative optimization frameworks that can handle constraints more robustly:
- Lagrangian Duality: Terrence W. K. Mak and Cuong Dinh Tran developed the Lagrangian Dual Framework (LDF), which integrates constraints directly into the training loop. This allows models to respect non-differentiable societal requirements by treating them as part of a dual optimization problem Lagrangian Duality for Constrained Deep Learning.
- Manifold Optimization: In wireless communications, where max-min fairness is used to ensure the weakest user still gets a signal, Zhiqiang Wu and colleagues use Riemannian manifold optimization. Instead of relaxing constraints, they treat the hardware and fairness limits as geometric surfaces that the algorithm traverses Manifold Optimization Based Multi-user Rate Maximization Aided by Intelligent Reflecting Surface.
- Bilevel Optimization: To ensure that fair models are also Pareto-efficient, Sofiane Tanji and Yassine Laguel proposed BADR, a bilevel framework that adaptively rescales gradients to balance accuracy and fairness without sacrificing one group's performance unnecessarily Fairness-informed Pareto Optimization : An Efficient Bilevel Framework.
By turning discrete social requirements into continuous mathematical signals, this research direction ensures that fairness is not just a post-processing "fix," but a fundamental part of how machines learn.