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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 59d41e2a-4c6f-4f6c-948f-a140bbfbab8aCited 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
