Provably Good Solutions to the Knapsack Problem via Neural Networks of Bounded Size
Christoph Hertrich, Martin Skutella
Abstract
The development of a satisfying and rigorous mathematical understanding of the performance of neural networks is a major challenge in artificial intelligence. Against this background, we study the expressive power of neural networks through the example of the classical NP-hard Knapsack Problem. Our main contribution is a class of recurrent neural networks (RNNs) with rectified linear units that are iteratively applied to each item of a Knapsack instance and thereby compute optimal or provably good solution values. We show that an RNN of depth four and width depending quadratically on the profit of an optimum Knapsack solution is sufficient to find optimum Knapsack solutions. We also prove the following tradeoff between the size of an RNN and the quality of the computed Knapsack solution: for Knapsack instances consisting of n items, an RNN of depth five and width w computes a solution of value at least 1 - O(n^2 sqrt(w)) times the optimum solution value. Our results build upon a classical dynamic programming formulation of the Knapsack Problem as well as a careful rounding of profit values that are also at the core of the well-known fully polynomial-time approximation scheme for the Knapsack Problem. Finally, we point out that our results can be generalized to many other combinatorial optimization problems that admit dynamic programming solution methods, such as various Shortest Path Problems, the Longest Common Subsequence Problem, and the Traveling Salesperson Problem.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
12 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Training Neural Networks is ER-complete cites Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes
- Training Neural Networks is ER-complete cites Towards Lower Bounds on the Depth of ReLU Neural Networks
- Towards Lower Bounds on the Depth of ReLU Neural Networks cites Training Neural Networks is ER-complete
- Depth-Bounds for Neural Networks via the Braid Arrangement cites Training Fully Connected Neural Networks is ∃R-Complete
- Depth-Bounds for Neural Networks via the Braid Arrangement cites Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes
- Depth-Bounds for Neural Networks via the Braid Arrangement cites Towards Lower Bounds on the Depth of ReLU Neural Networks
- Simulation of Graph Algorithms with Looped Transformers cites Neural Execution of Graph Algorithms
- Training Fully Connected Neural Networks is ∃R-Complete cites Training Neural Networks is ER-complete
- Training Fully Connected Neural Networks is ∃R-Complete cites Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes
- Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes cites Training Fully Connected Neural Networks is ∃R-Complete
- Training Fully Connected Neural Networks is ∃R-Complete cites Towards Lower Bounds on the Depth of ReLU Neural Networks
- Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes cites Towards Lower Bounds on the Depth of ReLU Neural Networks
- Towards Lower Bounds on the Depth of ReLU Neural Networks cites Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice Polytopes
- Unsupervised Extractive Summarization with Learnable Length Control Strategies cites A Novel Method to Solve Neural Knapsack Problems
Cited by top-tier papers12
- Towards Lower Bounds on the Depth of ReLU Neural NetworksChristoph Hertrich, Amitabh Basu, Marco Di Summa, Martin SkutellaNeurIPS 2021 · 70 citations
- Simulation of Graph Algorithms with Looped TransformersArtur Back de Luca, Kimon FountoulakisICML 2024 · 31 citations
- Training Neural Networks is ER-completeMikkel Abrahamsen, Linda Kleist, Tillmann MiltzowNeurIPS 2021 · 30 citations
- Depth-Bounds for Neural Networks via the Braid ArrangementMoritz Grillo, Christoph Hertrich, Georg LohoNeurIPS 2025 · 15 citations
- Unsupervised Extractive Summarization with Learnable Length Control StrategiesRenlong Jie, Xiaojun Meng, Xin Jiang, Qun LiuAAAI 2024 · 8 citations
Builds on5
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell et al.ICLR 2020 · 192 citations
- Towards Lower Bounds on the Depth of ReLU Neural NetworksChristoph Hertrich, Amitabh Basu, Marco Di Summa, Martin SkutellaNeurIPS 2021 · 70 citations
- Training Fully Connected Neural Networks is ∃R-CompleteDaniel Bertschinger, Christoph Hertrich, Paul Jungeblut, Tillmann Miltzow et al.NeurIPS 2023 · 39 citations
- A Novel Method to Solve Neural Knapsack ProblemsDuanshun Li, Jing Liu, Dongeun Lee, Ali Seyedmazloom et al.ICML 2021 · 7 citations
- Lower Bounds on the Depth of Integral ReLU Neural Networks via Lattice PolytopesChristian Haase, Christoph Hertrich, Georg LohoICLR 2023 · 3 citations
Related papers
- Deep Neural Network Approximated Dynamic Programming for Combinatorial OptimizationShenghe Xu, Shivendra S. Panwar, Murali S. Kodialam, T. V. LakshmanAAAI 2020 · 29 citations
- Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent NetworksAvi Schwarzschild, Eitan Borgnia, Arjun Gupta, Furong Huang et al.NeurIPS 2021 · 133 citations
- Improved Bounds on Neural Complexity for Representing Piecewise Linear FunctionsKuan-Lin Chen, Harinath Garudadri, Bhaskar D. RaoNeurIPS 2022 · 36 citations
- Better Neural Network Expressivity: Subdividing the SimplexEgor Bakaev, Florestan Brunck, Christoph Hertrich, Jack Stade et al.STOC 2026 · 16 citations
- On the Representational Capacity of Recurrent Neural Language ModelsFranz Nowak, Anej Svete, Li Du, Ryan CotterellEMNLP 2023
