TorchLean API

NN.Verification.Robustness.TopLabel

Certified label checks #

Shared predicates for certified classification from output bounds.

The checker uses one rule: the claimed label's lower bound must be strictly above every other class upper bound. Tensor bounds come from in-memory IBP/CROWN runs. Array bounds come from JSON artifacts.

def NN.Verification.Robustness.TopLabel.strictTopLabelBy {α : Type} [Max α] (n label : ) (lo hi : Fin nα) (gt : ααBool) :

Strict label certificate over any indexed lower/upper bounds.

Instances For

    Check a label directly from tensor lower/upper bounds.

    Instances For

      Check a label from JSON-style array lower/upper bounds.

      Instances For