Constrained Machine Learning Through Hyperspherical Representation

Gaetano Signorelli, Michele Lombardi
4/11/2025
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

The problem of ensuring constraints satisfaction on the output of machine learning models is critical for many applications, especially in safety-critical domains. Modern approaches rely on penalty-based methods at training time, which do not guarantee to avoid constraints violations; or constraint-specific model architectures (e.g., for monotonocity); or on output projection, which requires to solve an optimization problem that might be computationally demanding. We present the Hypersherical Constrained Representation, a novel method to enforce constraints in the output space for convex and bounded feasibility regions (generalizable to star domains). Our method operates on a different representation system, where Euclidean coordinates are converted into hyperspherical coordinates relative to the constrained region, which can only inherently represent feasible points. Experiments on a synthetic and a real-world dataset show that our method has predictive performance comparable to the other approaches, can guarantee 100% constraint satisfaction, and has a minimal computational cost at inference time.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{signorelli2025constrained,
  title  = {Constrained Machine Learning Through Hyperspherical Representation},
  author = {Gaetano Signorelli and Michele Lombardi},
  year   = {2025},
  eprint = {2504.08415},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.08415v1}
}

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/2504.08415.svg)](https://codeofpaper.com/paper/2504.08415)

Discussion