cs.LGOct 8, 2026

NP-Hardness of Minimizing Neurons in Two-Hidden-Layer ReLU Neural Networks

Authors: Sangrock Lee

Organizations: FAMU–FSU College of Engineering, Florida State University, Tallahassee, FL, 32310

Abstract

A fundamental question in neural network architecture optimization is whether the minimum hidden-neuron count required to approximate a target function within a prescribed tolerance can be computed efficiently. This paper resolves this question for two-hidden-layer ReLU networks under an Lp(Rd,Rm)L^p(\mathbb{R}^d,\mathbb{R}^m) approximation constraint. For every fixed d≥1d \ge 1, m≥1m \ge 1, and 1≤p<∞1 \le p < \infty, we prove that computing the optimum exactly is NP-hard. The result holds even when the target is represented by a rational ReLU network whose realization is nonzero, componentwise nonnegative, compactly supported, globally Lipschitz, and continuous piecewise affine. The polynomial-time reduction from 3-SAT produces an architecture gap in which unsatisfiable formulas yield an optimum of zero, whereas satisfiable formulas yield an optimum of at least d+2d+2. The proof constructs compactly supported polyhedral frustum functions realized by two-hidden-layer ReLU networks and establishes the LpL^p-density of finite linear combinations of box-frustum functions. The results offer theoretical justification for employing heuristic approximation methods in the design of ReLU neural networks, illustrating that attaining a minimal configuration within polynomial time is computationally unachievable.

Figures & tables

Explore similar work

CardsList
  1. Parameterized Hardness of Zonotope Containment and Neural Network Verification

    Sep 26, 2025Vincent Froese, Moritz Grillo, Christoph Hertrich +1Neural Network VerificationParameterized Complexity

  2. Shallower ReLU Network Representations via Exact Linear Algebra

    Jul 22, 2026Kilian Rueß, Gennadiy Averkov, Florestan Brunck +7Shallow Neural NetworksReLU Neural Networks

  3. Every Layer Counts: An Exponential L2L_2 Depth Hierarchy for ReLU Networks

    Aug 24, 2026Itay SafranShallow Neural NetworksReLU Neural Networks