Farkas-Certified Neural Safety Shield / report.md

Mechanism confirmed, baseline not beaten

Raw ⬇ ZIP

Эксперимент: Farkas-Certified Neural Safety Shield (#1053)

{ "worked": true, "confidence": 8, "verdict": "Built a readable 2-D Farkas-certified constraint reducer and Euclidean safety projection in shield_experiment.py. The mechanism manifested: for pointed cones, retained constraints stayed at 2 as M increased from 4 to 64, projection error and nominal decision disagreement were both 0, and 10,000 random containment checks found 0 false-safe samples with certificate residual below 7e-16. The angular sweep showed reduced compression as normals approached or spanned a half-plane boundary, while full-circle constraints retained all facets. Reduced projection was 33x–1848x faster in this toy projection benchmark, although certification cost and realistic QP solver overhead were not included.", "metrics": { "baseline": "Full 2-D projection over M constraints retained all M constraints. Runtime for M=16,32,64,128 was 0.0965, 0.3375, 1.3994, and 7.6960 seconds.", "idea": "Certified reduction on pointed cones retained 2/4, 2/8, 2/16, 2/32, and 2/64 constraints with zero sampled projection error and 100% decision agreement. Reduced runtimes were 0.00295, 0.00260, 0.00274, and 0.00417 seconds, giving speedups of 32.7x, 129.8x, 511.0x, and 1847.5x. The half-plane sweep retained 2/32 at spreads 0.5 and 1.2, 21/32 at 1.55, 28/32 at 1.7, and 32/32 at 2.4." }, "how_to_run": "/home/maxwelhelp/main/bin/python3 shield_experiment.py > results.json", "files": [ "shield_experiment.py", "results.json" ], "limitations": "This is a deterministic 2-D synthetic halfspace experiment, not a neural policy, multi-agent simulator, double-integrator, or learned RL benchmark. The projection solver is a small active-set enumerator rather than a production QP solver; timing excludes reduction and certification overhead and uses deliberately redundant offsets, so the speedups are mechanism-level rather than end-to-end claims." }