humancompatible.train: Implementing Optimization Algorithms for Stochastically-Constrained Stochastic Optimization Problems

Andrii Kliachkin, Jana Lepšová, Gilles Bareilles, Jakub Mareček
9/25/2025
cs.LGmath.OC

Official code: humancompatible/train (5 stars, Apache-2.0, last commit 2026-02-17).

Abstract

There has been a considerable interest in constrained training of deep neural networks (DNNs) recently for applications such as fairness and safety. Several toolkits have been proposed for this task, yet there is still no industry standard. We present humancompatible.train (https://github.com/humancompatible/train), an easily-extendable PyTorch-based Python package for training DNNs with stochastic constraints. We implement multiple previously unimplemented algorithms for stochastically constrained stochastic optimization. We demonstrate the toolkit use by comparing two algorithms on a deep learning task with fairness constraints.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Fairness-constrained training of machine learning models in TensorFlow, PyTorch, and beyond

53Python, Jupyter NotebookJun 19, 20248 months agoApache-2.0

Similar Papers

Cite this paper

@article{kliachkin2025humancompatibletrain,
  title  = {humancompatible.train: Implementing Optimization Algorithms for Stochastically-Constrained Stochastic Optimization Problems},
  author = {Andrii Kliachkin and Jana Lepšová and Gilles Bareilles and Jakub Mareček},
  year   = {2025},
  eprint = {2509.21254},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.21254v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.21254.svg)](https://codeofpaper.com/paper/2509.21254)

Discussion