Skip to content

Safety Budgets

max_risk is the shield's initial episode budget for eventual unsafe reachability. It is not a one-step failure probability and not a reward penalty.

Feasibility

At reset, at least one focal action must satisfy the robust certificate at the initial state and opponent-level floor. If the best action needs more budget than max_risk, shield construction or reset fails with both the best eventual risk demand and best immediate unsafe probability. Raising max_risk can make the configuration feasible, but changes the safety contract rather than merely silencing an error.

The reset demand is a property of the learned models, so a feasible budget is model-specific. The campaign budgets are:

Environment Campaign max_risk Notes
Bertrand, Chicken, Gathering, Markov Stag Hunt 0.20 A surely-safe action exists from reset, so the demand is 0.
Congestion 0.10 Demand 0 from reset; both roles are shielded in the campaign.
Pursuit 0.16 Reset demand about 0.1515 under the successor world model.

The Pursuit notebook defaults to 0.16. The earlier product-Bernoulli world model put the demand at about 0.103, where 0.11 sufficed; with the default successor world model, 0.11 makes the shield correctly refuse to deploy.

Successor Budgets

For the executed action, the shield constructs one successor-budget vector that works across every accessible opponent level. Each successor receives at least its robust floor-wise certificate. In the default mode, any remaining allowance is filled egalitarianly while all expected-budget constraints remain satisfied.

The learned-budget modes let the policy propose how to distribute the remaining allowance. The wrapper projects that proposal into the same robust feasible polytope; a numerical or feasibility failure falls back to a certified allocation rather than relaxing safety. The action stored and scored by PPO is the exact raw proposal whose projection determined the transition.

After the environment transition, the budget becomes the value assigned to the realized successor. Unknown successors receive budget 1.0, which normally forces a later infeasibility rather than assuming unobserved behavior is safe.

With shield_padding_radius > 0, the same rule holds against a total-variation ball around each level's row: costs use the padded worst case, and the egalitarian fill keeps the padded inequality. See Guarantees and Robustness.

Level Changes

Raising the opponent-level floor does not directly change the numeric budget. It changes which level-specific transition distributions the next action must tolerate. Because the floor never falls, a run cannot relax its opponent assumption after briefly committing to a higher level.

Why Unspent Budget Matters

The pure-action shield often leaves budget unspent: it only replaces an action when the proposal is infeasible. That slack is not wasted. When the learned models are wrong, the real expectation of the committed certificate can exceed the carried budget, and the slack absorbs that excess. Randomised and learned-budget modes can spend the whole allowance, which is why they are ablations rather than the default. The risk-dominance audit measures this excess directly.

Learner Visibility

The focal policy observes both the current budget and the level floor as two extra continuous features. The base world model, opponent model, and graph keys continue to use only the public environment state; shield bookkeeping is not folded into those artifacts.

In bayesian_mixture mode, the normalized opponent posterior is also appended because the feasible set depends directly on it. Pairwise-mixed and learned-budget modes use a factored categorical/raw-Gaussian focal action space; non-focal agents retain their original discrete spaces.