Skip to content

Invalid SAT Witness (with Colab Reproduction) #880

@YalcinerMustafa

Description

@YalcinerMustafa

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:

  1. Solving the Query with Marabou
    The script first loads an .ipq file that captures the input-output behavior of a neural network.
    Then, Marabou solves the query and returns a SAT witness where all input variables are set to 0 and values are assigned to all intermediate and output variables.

  2. Manual Evaluation of a Constraint
    We select one specific linear equality constraint from the .ipq file 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 for x_target based on this equation in our own python code. Then we compare this computed value to the value Marabou assigned to x_target.

  3. Discrepancy Detection
    The manually computed value of x_target does not match the value assigned by Marabou in its solution. The difference is significant, showing that the constraint is violated and that the SAT witness is incorrect.

  4. Sanity Check via ONNX Runtime
    The variable x_target happens 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions