-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Hi Marabou team,
I encountered a case where Marabou returns a SAT witness that violates a linear equality constraint explicitly specified in the .ipq file. To demonstrate the issue, I’ve created a Google Colab script that uses maraboupy to load and solve the query (which represents a ReLU neural network), and then shows that one of the linear equality constraints is actually not satisfied by the returned witness.
The main steps in the colab are as follows:
-
Solving the Query with Marabou
The script first loads an.ipqfile that captures the input-output behavior of a neural network.
Then, Marabou solves the query and returns aSATwitness where all input variables are set to 0 and values are assigned to all intermediate and output variables. -
Manual Evaluation of a Constraint
We select one specific linear equality constraint from the.ipqfile for which we know that the constraint is violated.
The constraint is specified in the colab and is of the form:
x_target = a₁ * x₁ + a₂ * x₂ + ... + aₙ * xₙ
We use Marabou’s values for the variables on the right-hand side to compute a value forx_targetbased on this equation in our own python code. Then we compare this computed value to the value Marabou assigned tox_target. -
Discrepancy Detection
The manually computed value ofx_targetdoes not match the value assigned by Marabou in its solution. The difference is significant, showing that the constraint is violated and that theSATwitness is incorrect. -
Sanity Check via ONNX Runtime
The variablex_targethappens to correspond to the output node of the neural network. We independently evaluate the network using ONNX Runtime on the fixed input and obtain a value for the output node. This ONNX-derived value matches our manual computation, confirming that the Marabou-assigned value is incorrect.
I’ve encountered similar incorrect SAT witnesses in other cases as well and was not yet able to come up with a workaround for them.
That is why I'd highly appreciate any advice on this issue and I am happy to provide more details.
Best regards,
Mustafa
Link to relevant files that are also automatically downloaded within the colab: