Legendre Feasibility Layer / report.md
Mechanism confirmed, baseline not beaten
Эксперимент: Legendre Feasibility Layer (#359)
{ "worked": true, "confidence": 8, "verdict": "Built a differentiable Legendre feasibility layer using entropy on the simplex plus logarithmic capacity barriers, with unrolled KKT Newton updates and feasibility-preserving backtracking. The mechanism manifested: Jacobian gain matched the predicted 1/(n epsilon) scaling to 1.6e-16 relative error, simplex log-ratios matched the predicted 1/epsilon law below 1e-15 absolute error, and score/epsilon equivariance was below 9e-18. In the toy comparison, the layer had slightly lower test MSE (0.0009941 vs 0.0010142, about 2.0% better) and zero violations, but required 16.7 seconds versus 0.71 seconds for the penalty model, so the practical speed win was absent.", "metrics": { "baseline": "Penalty softmax: test MSE 0.00101421, max capacity violation 0, minimum slack 0.5726, runtime 0.708 s", "idea": "Legendre barrier: test MSE 0.00099408, max capacity violation 0, minimum slack 0.5740, runtime 16.67 s; math checks: Jacobian relative error 1.6e-16, log-ratio absolute error <=8.9e-16, equivariance max error 8.7e-18" }, "how_to_run": "/home/maxwelhelp/main/bin/python3 legendre_experiment.py", "files": [ "legendre_experiment.py", "results.json" ], "limitations": "The main mechanism checks use the exact simplex entropy map rather than independently solving the general barrier problem. The comparison used a small synthetic dataset, softmax penalty baseline, unrolled Newton differentiation rather than a custom implicit backward, one seed, and relatively loose capacity constraints; Euclidean projection and active/near-boundary stress tests were not evaluated." }