Skip to main content

ImitationBoundScenario

Robotics scenarios · Implementation: mlsysim/engine/scenario_definitions/robotics/demonstrations.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

Worst-case imitation cost over one episode at control_rate with per-step error per_step_error: open loop, behavioral cloning, and aggregation with recoverability u.

Notes

Equation: Cloning scales as horizon**2*error; aggregation uses recoverability*horizon*error; capped values cannot exceed horizon.

Assumptions: Per-step loss is bounded by one and the supplied error/recoverability satisfy the cited helper assumptions.

Excludes: Empirical rollout measurement or guarantees for policies outside those assumptions.

References

Implementation references: mlsysim.physics.statistics.calc_behavior_cloning_cost_bound, mlsysim.physics.statistics.calc_dagger_cost_bound. These helper contracts state the source assumptions; the scenario binds their inputs and derives the displayed ratios and budgets.

Examples

The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.ImitationBoundsFiveSecondEpisode
>>> round(scenario.cloning_capped, 6)
250.0

Attributes

Name Description
aggregation Recoverability-scaled linear bound from calc_dagger_cost_bound; not a guarantee for arbitrary learned policies.
aggregation_capped Dataset-aggregation cost bound capped at the same horizon maximum.
capped_gap Dimensionless ratio of capped cloning and aggregation bounds; requires nonzero aggregation cost.
cloning Uncapped quadratic imitation bound from calc_behavior_cloning_cost_bound; not an empirical rollout error count.
cloning_capped Behavior-cloning cost bound capped at the episode’s maximum unit loss per step.
cloning_over_maximum Uncapped cloning bound divided by the maximum horizon loss; values above one indicate a vacuous bound.
control_rate
episode
horizon
horizon_steps Episode decision count; uses explicit horizon when supplied, otherwise rounds episode duration times control rate.
matching_error Per-step cloning error needed for its quadratic bound to equal the capped aggregation cost: aggregation_capped / horizon_steps**2.
open_loop Linear count of expected errors without compounding: horizon times per-step error; a comparison baseline.
per_step_error
recoverability
saturation_horizon Horizon at which the uncapped quadratic cloning bound reaches the maximum cumulative loss: reciprocal of positive per-step error.
vacuous_error Per-step error threshold at which the quadratic bound reaches horizon loss: 1 / horizon_steps.

episode

Type: Optional[Quantity].

Declared default: None.

control_rate

Type: Optional[Quantity].

Declared default: None.

per_step_error

Type: float.

Declared default: required.

recoverability

Type: float.

Declared default: 1.0.

horizon

Type: Optional[int].

Declared default: None.

horizon_steps

engine.scenario_types.ImitationBoundScenario.horizon_steps

Episode decision count; uses explicit horizon when supplied, otherwise rounds episode duration times control rate.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

cloning_capped

engine.scenario_types.ImitationBoundScenario.cloning_capped

Behavior-cloning cost bound capped at the episode’s maximum unit loss per step.

Equation: min(self.horizon_steps, self.cloning)

aggregation_capped

engine.scenario_types.ImitationBoundScenario.aggregation_capped

Dataset-aggregation cost bound capped at the same horizon maximum.

Equation: min(self.horizon_steps, self.aggregation)

capped_gap

engine.scenario_types.ImitationBoundScenario.capped_gap

Dimensionless ratio of capped cloning and aggregation bounds; requires nonzero aggregation cost.

Equation: self.cloning_capped / self.aggregation_capped

matching_error

engine.scenario_types.ImitationBoundScenario.matching_error

Per-step cloning error needed for its quadratic bound to equal the capped aggregation cost: aggregation_capped / horizon_steps**2.

Equation: self.aggregation_capped / self.horizon_steps ** 2

saturation_horizon

engine.scenario_types.ImitationBoundScenario.saturation_horizon

Horizon at which the uncapped quadratic cloning bound reaches the maximum cumulative loss: reciprocal of positive per-step error.

Equation: 1.0 / self.per_step_error

open_loop

engine.scenario_types.ImitationBoundScenario.open_loop

Linear count of expected errors without compounding: horizon times per-step error; a comparison baseline.

Equation: self.horizon_steps * self.per_step_error

cloning

engine.scenario_types.ImitationBoundScenario.cloning

Uncapped quadratic imitation bound from calc_behavior_cloning_cost_bound; not an empirical rollout error count.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

aggregation

engine.scenario_types.ImitationBoundScenario.aggregation

Recoverability-scaled linear bound from calc_dagger_cost_bound; not a guarantee for arbitrary learned policies.

Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.

vacuous_error

engine.scenario_types.ImitationBoundScenario.vacuous_error

Per-step error threshold at which the quadratic bound reaches horizon loss: 1 / horizon_steps.

Equation: 1.0 / self.horizon_steps

cloning_over_maximum

engine.scenario_types.ImitationBoundScenario.cloning_over_maximum

Uncapped cloning bound divided by the maximum horizon loss; values above one indicate a vacuous bound.

Equation: self.cloning / self.horizon_steps

Back to top