Margin Certificate Checker #
Reusable checker for per-example logit-margin certificates (robust_margin_cert_v0_1).
The checker reads exported output bounds and recomputes the strict top-label margin:
$\mathrm{logits}_{\mathrm{hi}}[j]<\mathrm{logits}_{\mathrm{lo}}[\mathrm{label}]$ for every $j\neq\mathrm{label}$.
Certificate format tag expected at the top level of margin certificate JSON files.
Instances For
Instances For
Add one (nominalOk, certifiedOk) outcome to the report counters.
Instances For
Check a robust_margin_cert_v0_1 JSON certificate file.
If timing = true, prints per-example timings every timingEvery examples.
Instances For
Check a margin certificate file with timing disabled.
Instances For
Parsed CLI flags for a margin-certificate run.
- path : String
Certificate JSON path.
- timing : Bool
Print per-example checker timings.
- timingEvery : ℕ
Print every
timingEveryexamples when timing is enabled;0disables periodic lines.