Adaptive masking scheduler with safeguards
A transparent, rule-based scheduler that paces observation masking by measured performance, holds or partially restores information on degradation, and is still guaranteed to finish with a hardware-compatible actor.
What it demonstrates
A transparent, rule-based scheduler that paces observation masking by measured performance, holds or partially restores information on degradation, and is still guaranteed to finish with a hardware-compatible actor.
How it works
Every evaluation window, the scheduler smooths a composite performance score with an exponential moving average and compares it to a reference taken before the current group started being masked. A drop above the hold threshold pauses progress, and the hold is only released when the drop falls below a lower recovery threshold (hysteresis). A drop above the restore threshold lowers the mask fraction, subject to a cooldown, a per-group limit and a global budget.
A monotone floor rises from a start iteration to a hard deadline. No mask fraction may fall below it, so at the deadline all 19 privileged channels are masked regardless of performance.
The performance signal here is SYNTHETIC: a made-up curve that dips when a group is masked and recovers with exposure, plus a degradation you can inject. It illustrates the scheduler logic and is not a training result.
Adjustable parameters
- Hold threshold (relative drop, 0.01–0.2)
- Restore threshold (0.02–0.4)
- Mask step per decision (0.01–0.2)
- Max restorations per group (0–6)
- Hard deadline (3000–8000 iterations)
- Synthetic sensitivity, injected degradation size and time
- Noise seed
Known limitations
- The performance signal is synthetic. It says nothing about how a real policy would respond to masking.
- Thresholds and the composite score weights are untuned proposals.
- A real implementation must evaluate on separate deterministic episodes so that the masking itself does not bias the score.
Equations
Core update rule
const drop = (reference - ema) / Math.abs(reference);
if (holding && drop <= cfg.recoverTol) holding = false; // hysteresis
else if (!holding && drop > cfg.degradeTol) holding = true;
if (drop > cfg.restoreTol && cooldown === 0 && f[g] > floor
&& restorations[g] < cfg.maxRestorations && total < cfg.restoreBudget) {
f[g] = Math.max(floor, f[g] - cfg.restoreStep); // give info back
} else if (!holding) f[g] = Math.min(1, f[g] + cfg.step); // keep masking
for (const k of groups) f[k] = Math.max(f[k], floorAt(iter)); // safeguardExplained in Chapter 10: Observation Masking (proposed)