CertifiedRadiusScenario
Statistics scenarios · Implementation: mlsysim/engine/scenario_definitions/statistics.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Binary randomized smoothing at noise noise_sd, against an l-infinity budget on one input.
The l-infinity budget is linf_levels steps of an image whose pixels take pixel_levels values; its box corner has Euclidean length budget * sqrt(coordinates), the length the certificate must reach to cover the whole box.
Notes
Equation: The smoothing helper gives an L2 radius; the L-infinity corner has norm sqrt(coordinates) times its coordinate budget.
Assumptions: The supplied top-class probability is a valid smoothing probability bound under Gaussian noise.
Excludes: Estimating that probability from samples or certifying a different noise distribution.
References
Derivation: The smoothing helper gives an L2 radius; the L-infinity corner has norm sqrt(coordinates) times its coordinate budget. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.
Examples
Evaluate a named scenario using its declared inputs.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.SmoothingRadiusCifar10
>>> round(float(scenario.radius), 4)
1.5451Attributes
| Name | Description |
|---|---|
| box_corner_l2 | L2 norm of an L-infinity box corner over the declared number of coordinates. |
| coordinates | |
| covers_box | Whether the smoothing radius contains the entire L-infinity perturbation box. |
| linf_budget | Per-coordinate normalized perturbation budget from integer intensity levels. |
| linf_levels | |
| noise_sd | |
| pixel_levels | |
| quantile | Dimensionless Gaussian quantile implicit in the smoothing radius divided by noise |
| radius | Certified L2 radius in normalized input units under the supplied smoothed top-class |
| top_class_probability |
noise_sd
Type: float.
Declared default: required.
top_class_probability
Type: float.
Declared default: required.
linf_levels
Type: int.
Declared default: required.
pixel_levels
Type: int.
Declared default: required.
coordinates
Type: int.
Declared default: required.
radius
engine.scenario_types.CertifiedRadiusScenario.radius
Certified L2 radius in normalized input units under the supplied smoothed top-class probability.
Equation: calc_smoothing_radius(noise_sd, top_class_probability).
quantile
engine.scenario_types.CertifiedRadiusScenario.quantile
Dimensionless Gaussian quantile implicit in the smoothing radius divided by noise standard deviation.
Phi^-1(p_A).
Equation: radius / noise_sd.
linf_budget
engine.scenario_types.CertifiedRadiusScenario.linf_budget
Per-coordinate normalized perturbation budget from integer intensity levels.
Equation: linf_levels / (pixel_levels - 1).
box_corner_l2
engine.scenario_types.CertifiedRadiusScenario.box_corner_l2
L2 norm of an L-infinity box corner over the declared number of coordinates.
Equation: calc_linf_corner_l2(linf_budget, coordinates).
covers_box
engine.scenario_types.CertifiedRadiusScenario.covers_box
Whether the smoothing radius contains the entire L-infinity perturbation box.
Equation: radius >= box_corner_l2.