Two linear programs suffice for polynomial-time optimization

Contributed by Alex Black, Christoph Hertrich, Stefan Kober, Georg Loho, Moritz Stargalla ↗

Version 1 / Dec 04, 2026 / CC BY 4.0

Abstract

We show that under mild assumptions a continuous piecewise linear (CPWL) function that can be evaluated in polynomial time can also be expressed with a ReLU network of polynomial size and through a polynomial-size virtual extended formulation. More precisely, for families (fd ⁣:Rd→R)d≥1(f_d\colon \mathbb{R}^d\to \mathbb{R})_{d\geq 1} of positively homogeneous CPWL functions whose linear coefficients are integers of polynomial encoding size in dd, the following statements are equivalent: - (i) Evaluating (fd)(f_d) on integer inputs is in FP/poly\mathsf{FP/poly}. That is, for each fdf_d, there exist polynomial-size Boolean circuits evaluating fdf_d assuming standard binary encoding of integers. - (ii) For each fdf_d there exists a polynomial-size ReLU network with integer weights of polynomial encoding size that computes fdf_d exactly on all real inputs in Rd\mathbb{R}^{d}. - (iii) For each fdf_d there exists a polynomial-size (max⁡,+,−)(\max,+,-) circuit that computes fdf_d exactly on all real inputs in Rd\mathbb{R}^{d}. - (iv) For each fdf_d there exists a polynomial-size virtual extended formulation representing fdf_d. That is, for each dd, there are rational polytopes R,Q⊆Rpoly⁡(d)R,Q\subseteq \mathbb{R}^{\operatorname{poly}(d)} in halfspace representation and linear maps πR,πQ\pi_{R},\pi_{Q} into Rd\mathbb{R}^{d}, all of polynomial encoding size, such that fd(w)=max⁡x∈Rw⊤πR(x)−max⁡y∈Qw⊤πQ(y)f_d(w)=\max_{x\in R}w^\top \pi_{R}(x)-\max_{y\in Q}w^\top \pi_{Q}(y) for all w∈Rdw\in \mathbb{R}^{d}. An analogous equivalence holds for CPWL functions that are not positively homogeneous. Moreover, the uniform version of the equivalence is also true. That is, if evaluating (fd)(f_d) on integer inputs is in FP\mathsf{FP}, then the objects in (ii) to (iv) can be constructed in polynomial time. One consequence from this is that for every family of 0-1 polytopes (Pd)(P_d) over which linear optimization can be done in polynomial time, the linear optimization problem over PdP_d can be represented as a difference of two linear programs of polynomial size, showing that every such family has polynomial virtual extension complexity. Hence, virtual extended formulations are significantly more powerful than ordinary extended formulations, which require exponential size for some polynomial-time solvable problems such as matching. In particular, proving superpolynomial lower bounds on the virtual extension complexity of any 0-1 polytope family corresponding to an NP\mathsf{NP}-hard problem would imply P≠NP\mathsf{P}\neq \mathsf{NP}.

Provenance statement

On October 16, we found a construction for polynomial-sized ReLU networks that compute the support function of the matching polytope in interaction with ChatGPT-6. After inspecting the output, we had the impression that the techniques used in the construction were not specific to the matching polytope and should apply more broadly. After prompting in that direction, on October 22, ChatGPT extended the construction to the more general case of families of CPWL functions with integral linear pieces of polynomially bounded encoding size. Except for the title, abstract, and Section 0, the remaining manuscript was written essentially entirely by ChatGPT on November 11. We are confident that the main results in this manuscript are correct and we are currently working towards creating a human-written and human-readable version in the near future.

References

  1. S. Arora and B. Barak. Computational Complexity: A Modern Approach . Cambridge University Press, 2009.
  2. S. Barez. Exact polynomial-size ReLU networks for maximum-weight matching. hexagon:2611.01434v1 (https://hexagonmath.org/2611.01434v1), 2026.hexagon
  3. A. E. Black, C. Hertrich, S. Kober, and G. Loho. Two linear programs are better than one. arXiv:2610.15909 (https://arxiv.org/abs/2610.15909), 2026.arXiv
  4. J. Fearnley, P. Goldberg, A. Hollender, and R. Savani. The complexity of gradient descent: CLS == PPAD ∩\cap PLS. Journal of the ACM , 70(1), 1-74, 2022. doi:10.1145/3568163 (https://doi.org/10.1145/3568163)DOI
  5. J. Fearnley, P. Goldberg, A. Hollender, and R. Savani. The complexity of computing KKT solutions of quadratic programs. Journal of the ACM , 72(5), 1-48, 2025. doi:10.1145/3745017 (https://doi.org/10.1145/3745017)DOI
  6. A. Frank and É. Tardos. An application of simultaneous Diophantine approximation in combinatorial optimization. Combinatorica , 7(1):49--65, 1987. doi:10.1007/BF02579200 (https://doi.org/10.1007/BF02579200).DOI
  7. C. Hertrich and G. Loho. Neural networks and (virtual) extended formulations. arXiv:2411.03006 (https://arxiv.org/abs/2411.03006), 2024.arXiv
  8. C. Hertrich and M. Stargalla. Tropical circuits with scalar multiplication gates. arXiv:2607.11540 (https://arxiv.org/abs/2607.11540), 2026.arXiv
  9. R. Kannan and A. Bachem. Polynomial algorithms for computing the Smith and Hermite normal forms of an integer matrix. SIAM Journal on Computing , 8(4):499--507, 1979. doi:10.1137/0208040 (https://doi.org/10.1137/0208040).DOI
  10. A. K. Lenstra, H. W. Lenstra, Jr., and L. Lovász. Factoring polynomials with rational coefficients. Mathematische Annalen , 261:515--534, 1982. doi:10.1007/BF01457454 (https://doi.org/10.1007/BF01457454).DOI
Show all 13 referencesShow fewer references
  1. T. Rothvoß. The matching polytope has exponential extension complexity. Journal of the ACM , 64(6):Article 41, 2017. doi:10.1145/3127497 (https://doi.org/10.1145/3127497).DOI
  2. A. Schrijver. Theory of Linear and Integer Programming . Wiley, 1986.
  3. A. Storjohann and G. Labahn. Asymptotically fast computation of Hermite normal forms of integer matrices. In Proceedings of ISSAC , pages 259--266, 1996.

Version history

  1. v1 · 32 pagesSubmitted by Moritz StargallaInitial depositCurrentDec 04, 2026