Differentiable optimization layers are traditionally integrated in predict-then-optimize frameworks where a neural model estimates parameters that subsequently serve as fixed inputs to downstream decision-making optimization problems. In this work, we introduce the concept of a "fairness layer": a differentiable optimization layer appended to a model's output layer that guarantees a chosen notion of output parity is satisfied when integrated into a neural network. Additionally, we introduce an online primal-dual inference algorithm that provides provable aggregate fairness guarantees for streaming predictions with arbitrarily small batch sizes, where traditional per-batch constraints become overly restrictive. Numerical experiments demonstrate the effectiveness of the fairness layer and associated algorithm, and theoretical analysis characterizes the layer's differentiability and stability properties during model training and backpropagation. Our code for these experiments is publicly available on GitHub (https://github.com/dtroxell19/FairDL-ICML-2026.git) and our public Python package documentation can be found online: https://dtroxell19.github.io/fairness_training/.
翻译:可微分优化层传统上集成于“预测-优化”框架中,其中神经网络模型估计的参数作为固定输入传递给下游决策优化问题。本文提出“公平性层”概念:这是一种附加在模型输出层上的可微分优化层,当集成到神经网络中时,能保证满足所选的输出公平性度量。此外,我们提出一种在线原始-对偶推理算法,该算法能为任意小批量的流式预测提供可证明的总体公平性保障,而传统逐批约束在此场景下会变得过于严格。数值实验证明了公平性层及关联算法的有效性,理论分析则刻画了模型训练与反向传播过程中该层的可微性与稳定性性质。我们的实验代码已在GitHub上公开(https://github.com/dtroxell19/FairDL-ICML-2026.git),公共Python包文档详见:https://dtroxell19.github.io/fairness_training/。