leggedrobotics / rayen

Imposition of Hard Convex Constraints on Neural Networks
BSD 3-Clause "New" or "Revised" License
69 stars 7 forks source link

interval matrix #2

Open marwaSaid opened 1 month ago

marwaSaid commented 1 month ago

Does RAYEN support interval matrices in Linear matrix inequalities?

jtorde commented 1 month ago

Hi @marwaSaid,

Which type of constraints would you like to impose with the interval matrices? I guess you mean having F0,...,F_k being interval matrices in the LMI constraint, and then finding a y that satisfies that constraint for all possible realizations of the matrices F0,...,F_k?

(I assume you are using this definition of an interval matrix)

RAYEN does not support LMI interval matrix constraints per se, but if there is a way to transform it to a standard LMI constraint then it will support it.

We also welcome pull requests with new features.

marwaSaid commented 1 month ago

Hi @jtorde ,

The output y needs to lies within a certain set, usually expressed as an interval, but it is not a constant one, it depends on the input each time Can something like this be feasible?

jtorde commented 1 month ago

In general, RAYEN does not support changing constraints right now (i.e., the parameters that define the constraints need to be constant)

However, there are some simple cases (for example y \in [a,b] where a and b are real numbers that depend on the input), where you can force that constraint by using a sigmoid (or tanh) and shifting/scaling it so that the output lies in [a,b]