journal article·2025-04-08Open access

Performance Guarantees of Recurrent Neural Networks for the Subset Sum Problem

Zengkai Wang, Weizhi Liao, Youzhen Jin, Zijia Wang

Biomimetics· Volume 10· Issue 4

Abstract

The subset sum problem is a classical NP-hard problem. Various methods have been developed to address this issue, including backtracking techniques, dynamic programming approaches, branch-and-bound strategies, and Monte Carlo methods. In recent years, researchers have proposed several neural network-based methods for solving combinatorial optimization problems, which have shown commendable performance. However, there has been limited research on the performance guarantees of recurrent neural networks (RNNs) when applied to the subset sum problem. In this paper, we conduct a novel investigation into the performance guarantees of RNNs to solve the subset sum problem for the first time. A construction method for RNNs is developed to compute both exact and approximate solutions of subset sum problems, and the mathematical model of each hidden layer in RNNs is rigorously defined. Furthermore, the correctness of the proposed RNNs is strictly proven through mathematical reasoning, and their performance is thoroughly analyzed. In particular, we prove wNN≥wOPT(1−ε) mathematically, i.e., the errors between the approximate solutions obtained by the proposed ASS-NN model and the actual optimal solutions are relatively small and highly consistent with theoretical expectations. Finally, the validity of RNNs is verified through a series of examples, where the actual error value of the approximate solution aligns closely with the theoretical error value. Additionally, our research reveals that recurrence relations in dynamic programming can effectively simulate the process of constructing solutions.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Machine Learning and Algorithms · Metaheuristic Optimization Algorithms Research · Neural Networks and Applications

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

College of Artificial Intelligence, Jiaxing University, Jiaxing 314001, China

School of Computer Science and Cyber Engineering, Guangzhou University, Guangzhou 510006, China

Funding

National Natural Science Foundation of China · Guangdong Natural Science Foundation · Guangzhou Science and Technology Planning Project

References (40)

Show source-provided references
1. Kang, L., Wan, L., and Li, K. (2014, January 13–15). Efficient parallelization of a two-list algorithm for the subset-sum problem on a hybrid CPU/GPU cluster. Proceedings of the 2014 Sixth International Symposium on Parallel Architectures, Algorithms and Programming, Beijing, China.10.1109/PAAP.2014.44 ↗
2. A competitive local search heuristic for the subset sum problem10.1016/S0305-0548(98)00046-X ↗
3. Madugula, M.K., Majhi, S.K., and Panda, N. (September, January 31). An efficient arithmetic optimization algorithm for solving subset-sum problem. Proceedings of the 2022 International Conference on Connected Systems & Intelligence (CSI), Trivandrum, India.10.1109/CSI54720.2022.9923996 ↗
4. GPU implementation of a parallel two-list algorithm for the subset-sum problem10.1002/cpe.3201 ↗
5. A novel cooperative accelerated parallel two-list algorithm for solving the subset-sum problem on a hybrid CPU–GPU cluster10.1016/j.jpdc.2016.07.003 ↗
6. Dutta, P., and Rajasree, M.S. (2021). Efficient reductions and algorithms for variants of Subset Sum. arXiv.10.1007/978-3-030-95018-7_19 ↗
7. Priority algorithms for the subset-sum problem10.1007/s10878-007-9126-9 ↗
8. Parque, V. (July, January 28). Tackling the Subset Sum Problem with Fixed Size using an Integer Representation Scheme. Proceedings of the 2021 IEEE Congress on Evolutionary Computation (CEC), Kraków, Poland.10.1109/CEC45853.2021.9504889 ↗
9. A genetic algorithm to solve the subset sum problem based on parallel computing
10. Effective parallelization strategy for the solution of subset sum problems by the branch-and-bound method10.1515/dma-2020-0028 ↗
11. Optimality and complexity analysis of a branch-and-bound method in solving some instances of the subset sum problem10.1515/comp-2020-0212 ↗
12. Solution of subset sum problem using genetic algorithm with rejection of infeasible offspring method
13. A genetic algorithm for subset sum problem10.1016/j.neucom.2003.12.003 ↗
14. Modified genetic algorithms based solution to subset sum problem10.14569/IJARAI.2012.010107 ↗
15. Saketh, K.H., and Jeyakumar, G. (2019, January 25–26). Comparison of dynamic programming and genetic algorithm approaches for solving subset sum problems. Proceedings of the Computational Vision and Bio-Inspired Computing: ICCVBIC 2019, Coimbatore, India.10.1007/978-3-030-37218-7_53 ↗
16. Lower time bounds for parallel solving of the subset sum problem by a dynamic programming algorithm10.1002/cpe.8144 ↗
17. Yang, F., Jin, T., Liu, T.Y., Sun, X., and Zhang, J. (2018, January 14–16). Boosting dynamic programming with neural networks for solving np-hard problems. Proceedings of the 10th Asian Conference on Machine Learning, ACML 2018, Beijing, China.
18. Allcock, J., Hamoudi, Y., Joux, A., Klingelhöfer, F., and Santha, M. (2021). Classical and quantum dynamic programming for Subset-Sum and variants. arXiv.
19. Dynamic Programming for the Subset Sum Problem10.2478/forma-2020-0007 ↗
20. Xu, S., Panwar, S.S., Kodialam, M., and Lakshman, T. (2020, January 7–12). Deep neural network approximated dynamic programming for combinatorial optimization. Proceedings of the AAAI 2020 Conference on Artificial Intelligence, New York, NY, USA.
21. Biesner, D., Gerlach, T., Bauckhage, C., Kliem, B., and Sifa, R. (2022, January 12–14). Solving subset sum problems using quantum inspired optimization algorithms with applications in auditing and financial data analysis. Proceedings of the 2022 21st IEEE International Conference on Machine Learning and Applications (ICMLA), Nassau, Bahamas.10.1109/ICMLA55696.2022.00150 ↗
22. Learning-augmented algorithms for online subset sum10.1007/s10898-022-01156-w ↗
23. Provably solving the hidden subset sum problem via statistical learning
24. Costandin, M. (2024). On a Geometric Interpretation Of the Subset Sum Problem. arXiv.
25. Quantum algorithm and experimental demonstration for the subset sum problem10.1007/s11432-021-3334-1 ↗
26. Solving the subset sum problem by the quantum Ising model with variational quantum optimization based on conditional values at risk10.1007/s11433-024-2385-7 ↗
27. The Subset Sum Problem: Reducing Time Complexity of NP-Completeness with Quantum Search
28. Bernstein, D.J., Jeffery, S., Lange, T., and Meurer, A. (2013, January 4–7). Quantum algorithms for the subset-sum problem. Proceedings of the Post-Quantum Cryptography: 5th International Workshop, PQCrypto 2013, Limoges, France. Proceedings 5.
29. Machine learning for combinatorial optimization: A methodological tour d’horizon10.1016/j.ejor.2020.07.063 ↗
30. Thapa, R. (2025, April 01). A Survey on Deep Learning-Based Methodologies for Solving Combinatorial Optimization Problems. Available online: https://www.researchgate.net/publication/343876842_A_Survey_on_Deep_Learning-based_Methodologies_for_Solving_Combinatorial_Optimization_Problems.
31. “Neural” computation of decisions in optimization problems10.1007/BF00339943 ↗
32. Solving the traveling salesman problem using a recurrent neural network10.1134/S1995423915030088 ↗
33. An efficient algorithm for the subset sum problem based on finite-time convergent recurrent neural network10.1016/j.neucom.2013.12.063 ↗
34. Gu, S., and Hao, T. (2018, January 29–31). A pointer network based deep learning algorithm for 0–1 knapsack problem. Proceedings of the 2018 Tenth International Conference on Advanced Computational Intelligence (ICACI), Xiamen, China.10.1109/ICACI.2018.8377505 ↗
35. Two-phase neural combinatorial optimization with reinforcement learning for agile satellite scheduling
36. Recurrent neural network approach for cyclic job shop scheduling problem10.1016/j.jmsy.2013.02.001 ↗
37. Provably good solutions to the knapsack problem via neural networks of bounded size10.1287/ijoc.2021.0225 ↗
38. Solving the subset-sum problem with a light-based device10.1007/s11047-007-9059-3 ↗
39. Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial nets. Advances in Neural Information Processing Systems, MIT Press.
40. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems, MIT Press.