LP-Embedded Input-Convex MLP
Implementation & benchmark of arXiv:2608.09707 — Input convex neural networks as surrogates in mathematical optimisation
Source paper: Input convex neural networks as surrogates in mathematical optimisation arXiv:2608.09707 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a standard ReLU surrogate with an input convex neural network whose hidden-to-hidden weights are constrained to be nonnegative. The network remains piecewise linear and expressive, but its convexity allows downstream minimization to use continuous ReLU epigraph constraints instead of binary activation variables, potentially eliminating the integrality bottleneck of neural optimization.
Formulas
Mathematical statement
For input x in R^d, define z_0=x and hidden states z_{k+1}=ReLU(W_k z_k+U_k x+b_k), where z_k is the vector of hidden activations, W_k is the hidden-to-hidden matrix, U_k is the direct input matrix, b_k is a bias vector, and ReLU(t)=max(0,t) is applied coordinatewise. If W_k is componentwise nonnegative for every k and the output is y=w^T z_L+u^T x+c with w componentwise nonnegative, then y=f(x) is convex in x; u and c are unrestricted, and L is the number of hidden layers. Enforce W_k>=0 by parameterizing W_k=softplus(A_k), where A_k is unconstrained. For minimization, each ReLU can be represented by its epigraph constraints z_{k+1}>=W_k z_k+U_k x+b_k and z_{k+1}>=0. Because the output coefficients w are nonnegative, minimizing y drives every z_{k+1} to the smallest feasible value, making this LP embedding exact whenever the optimization model does not require upper-side activation constraints or nonconvex interactions. The supervised fitting objective is L_fit=(1/N)sum_{i=1}^N(f(x_i)-y_i)^2, optionally augmented with a small weight-decay term; convexity is architectural rather than estimated from sampled Hessians.
Implementation notes
Integrate this as a surrogate MLP in a two-stage pipeline: first fit the network to expensive simulator or historical data, then insert its equations into a downstream linear or mixed-integer optimization model. In PyTorch, create unconstrained parameters A_k, U_k, b_k, u, and c; compute W_k=softplus(A_k)+epsilon; run the recurrence z[0]=x and z[k+1]=relu(W_k @ z[k] + U_k @ x + b_k); use the squared fitting loss shown above. Pseudocode: inputs x_batch,y_batch; for each layer compute W=softplus(A)+1e-6 and z=relu(W*z+U*x+b); output y=w*z+u*x+c; backpropagate and update all unconstrained parameters with AdamW. Keep w nonnegative using w=softplus(a_w). After training, export variables x,z_k and constraints z[k+1]>=W_k z[k]+U_k x+b_k and z[k+1]>=0 to scipy.optimize.linprog, HiGHS, or a larger LP/MIP model. The mathematical guarantees are the convexity implication from W_k>=0 and w>=0 and the exactness of the epigraph embedding for minimization; estimate practical approximation quality, solve-time benefit, and whether the application’s feasible set preserves convexity empirically. Start with a 3-layer width-64 surrogate for a synthetic convex function such as f(x)=||Bx||_2^2 plus noise, then test the same architecture on a small tabular benchmark with a known convex downstream objective. Compare against a width-matched ReLU MLP embedded with binary ReLU variables. Success means similar validation MSE, fewer branch-and-bound nodes, and materially lower wall-clock solve time; the strongest result is root-node termination with no binary variables and no degradation in the downstream objective.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built an ICNN surrogate with softplus-constrained hidden-to-hidden weights, controlled convexity sweeps, exact LP epigraph checks, and a matched ReLU MLP fitting comparison. Nonnegative weights produced only numerical Jensen violations (about 4e-14), the controlled sign transition matched predictions exactly, and one- and two-layer LP epigraph objectives matched forward ReLU values within 1.8e-15. The ICNN had much worse validation MSE than the ordinary ReLU MLP, so the optimization/embedding mechanism is supported but comparable approximation quality was not achieved.
- Agent confidence
- 8/10
- Baseline
- ReLU MLP validation MSE 0.00710; train MSE 0.00537 after 1200 steps
- Idea
- ICNN validation MSE 1.24048; train MSE 1.06844 after 1200 steps; maximum two-layer LP epigraph gap 1.78e-15; nonnegative-weight maximum Jensen violation 2.84e-14; controlled negative-gamma violations matched predictions
Limitations: No full downstream application, binary ReLU MIP, branch-and-bound node count, or wall-clock solve-time comparison was tested. The fitting comparison used one small synthetic quadratic dataset and CPU execution; the ICNN architecture was not extensively hyperparameter-tuned.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.09707)
No significant difference vs. the tuned baseline (+0.4%, p=0.9448, wins 4 / 8 paired seeds).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_med
- Paired seeds
- 8
- Baseline mean
- 5.4133
- Idea mean
- 0
- Effect (Δ)
- 0.0233 (+0.4%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.9448 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±13.4%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in tabular track was tested because this is an architectural/optimization intervention. Downstream LP/MIP solve time, branch-and-bound nodes, and a full application embedding were not measured. The comparison used a small two-layer width-32 architecture, 25 epochs, and a three-value learning-rate sweep.
How to run: python3 bench_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Built and ran the full Stage-2 paired-seed benchmark on the structurally matched tabular Friedman regression track. The ICNN mechanism signature was quantitatively confirmed: trained models had no Jensen violations above 1e-5, but test MSE was slightly worse than the tuned ReLU baseline (delta +0.02331, permutation p=0.94485), so there is no significant training win.
- Baseline
- Friedman tabular test MSE 5.413264 ± 0.775872 across 8 seeds; best lr=0.003
- Idea
- ICNN tabular test MSE 5.436576 ± 0.422453 across 8 seeds; best lr=0.01; paired delta +0.023312; p=0.94485; 4/8 seed wins
- Mechanism signature
- Observed maximum midpoint Jensen violation 3.8147e-06 and violation rate 0.0 across 8 trained ICNN models; predicted 0; confirmed=true
Benchmark result
No significant difference vs. the tuned baseline (+0.4%, p=0.9448, wins 4 / 8 paired seeds).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_med
- Paired seeds
- 8
- Baseline mean
- 5.4133
- Idea mean
- 0
- Effect (Δ)
- 0.0233 (+0.4%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.9448 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±13.4%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in tabular track was tested because this is an architectural/optimization intervention. Downstream LP/MIP solve time, branch-and-bound nodes, and a full application embedding were not measured. The comparison used a small two-layer width-32 architecture, 25 epochs, and a three-value learning-rate sweep.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 5.1 KB View Raw
- bench_report.json 3.0 KB View Raw
- experiment.py 6.6 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T100929.md 4.1 KB View
- results.json 3.0 KB View Raw