TorchLean API

NN.API.Verification.Core

Verification #

The public vocabulary used by trained-model verification. Ordinary code calls trained.verify center (radius := r) (norm := .inf) and adds named choices only when needed. Report retains those choices with the returned bounds; explicit graph lowering is intentionally separate in NN.API.Verification.Lowering.

Bound-propagation algorithm used to construct a verification report.

  • ibp : Algorithm

    Fast interval bound propagation.

  • crown : Algorithm

    Forward affine CROWN bounds.

  • alphaBetaCrown : Algorithm

    Fixed-relaxation Alpha-Beta-CROWN replay. Stable ReLU phases are inferred from IBP; this does not run an external branch-and-bound optimizer.

Instances For

    Human-readable method name used in reports.

    Instances For

      Norm of the input region requested for verification.

      The current native CROWN path implements .inf; the other cases remain part of the request language so adding a non-box region does not require another public API.

      • one : Norm

        L1 input ball.

      • two : Norm

        L2 input ball.

      • inf : Norm

        L-infinity input ball.

      Instances For
        @[instance_reducible]

        Human-readable norm name used in reports and diagnostics.

        Instances For

          Property evaluated from output bounds.

          .bounds returns the complete output enclosure. .topLabel label additionally asks whether one flattened output stays strictly above every competing output.

          • bounds : Property

            Return the output enclosure without an additional assertion.

          • topLabel (label : ) : Property

            Check that label remains the unique largest flattened output.

          Instances For
            Instances For

              Human-readable property description used in reports.

              Instances For

                Reject an invalid input-region radius before verification begins.

                Instances For

                  Componentwise lower and upper bounds for a flattened model output.

                  • size :

                    Shared number of flattened output components.

                  • lower : Tensor Float [self.size]

                    Componentwise lower output bounds.

                  • upper : Tensor Float [self.size]

                    Componentwise upper output bounds.

                  Instances For

                    Check the basic consistency needed by public reporting helpers.

                    Instances For

                      Largest output value other than label.

                      Instances For

                        Result of evaluating a requested output property from valid bounds.

                        • bounds : Result

                          The report contains an output enclosure but no additional assertion.

                        • topLabel (label : ) (margin : Float) (certified : Bool) : Result

                          A top-label assertion with its certified lower margin.

                        Instances For

                          One-line rendering of a verification result.

                          Instances For

                            Evaluate a public property against componentwise output bounds.

                            Instances For

                              Complete report returned by trained.verify.

                              • radius : Float

                                Radius of the checked input region around the supplied center tensor.

                              • norm : Norm

                                Norm used to define the checked input region.

                              • property : Property

                                Output property evaluated from the output enclosure.

                              • algorithm : Algorithm

                                Bound-propagation algorithm that produced the enclosure.

                              • bounds : Bounds

                                Output enclosure produced by the selected algorithm.

                              • result : Result

                                Chosen property evaluated from the output enclosure.

                              Instances For

                                Build a report from verified output bounds and named verification choices.

                                Instances For

                                  One-line human-readable verification summary.

                                  Instances For

                                    Print the concise verification summary.

                                    Instances For