# Эксперимент: Residual-Tightened Neural Safety Shield (#1381) { "worked": true, "confidence": 8, "verdict": "Built a one-dimensional residual-tightened action shield with exact quadratic projection, online EMA residual normalization, clipping, and a reproducible toy evaluation. The math check showed residual tightening is monotone in prediction error and every projected action satisfied the tightened constraint to numerical precision. In the experiment, adaptive shielding preserved nominal behavior while under shifted dynamics it reduced violations from 100% to 2% with substantially improved reward; an oracle fixed-margin control reached 0% violations but paid a large nominal intervention cost.", "metrics": { "baseline": "Unshielded: nominal violation 0.0%, reward -0.00549; shifted violation 100.0%, reward -0.11336, action deviation 0.0.", "idea": "Adaptive residual shield: nominal violation 0.0%, reward -0.00549, action deviation 0.0; shifted violation 2.0%, reward -0.02691, action deviation 0.498. Math: monotone residual ratio true; maximum tightened-constraint violation 1.11e-16." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 shield_experiment.py", "files": [ "shield_experiment.py", "results.json" ], "limitations": "This is a scalar toy system with an analytically solvable projection, not a trained neural policy or learned multidimensional dynamics model. The fixed-margin comparison uses an oracle shift-scale margin, and only one seed and additive dynamics shift were tested; inference latency and SQP or projected-gradient approximations were not benchmarked." }