RNN-MCTS-PINN: A Novel Integration of Recurrent Neural Networks, Monte Carlo Tree Search, and Physics-Informed Neural Networks for Symbolic Solutions to the Lane-Emden Type Equation

Document Type : Research Paper

Authors
1 School of Mathematics and Computer Science, Damghan University, P.O.Box 36715-364, Damghan, Iran.
2 Department of Computer and Data Sciences, Faculty of Mathematical Sciences, Shahid Beheshti University, Tehran, Iran.
10.22075/ijnaa.2026.35050.5235
Abstract
In this paper, we introduce an innovative approach that integrates three robust architectures and methods: recurrent neural networks, the Monte Carlo tree search algorithm, and the physics-informed neural networks approach. This method is designed to symbolically solve the Lane-Emden type equation, a nonlinear ordinary differential equation. The proposed scheme consists of three phases. In Phase 1, a recurrent neural network is employed to find a numerical solution for the equation. Phase 2 involves using a carefully crafted Monte Carlo tree search algorithm to perform symbolic regression on the results from the previous phase. During Phase 2, a symbolic solution to the equation is found. This involves designing a Monte Carlo tree search algorithm that utilizes a context-free grammar to construct a mathematical expression with certain coefficients through a tree representation of successive substitution in the grammar. In Phase 3, the coefficients of the symbolic expression identified in Phase 2 are fine-tuned using the physics-informed neural networks approach. To refine the coefficients found by the Monte Carlo tree search, Phase 3 treats the computational graph of the mathematical expression generated in PyTorch as a network. The physics-informed neural networks approach is then applied to optimize the parameters (coefficients) of the symbolic expression. To evaluate the effectiveness of the proposed scheme, we apply it to the Lane-Emden type equation, a challenging and suitable benchmark. The results demonstrate that our method is effective for symbolically solving nonlinear ordinary differential equations.
Keywords
Subjects

[1] G. Adomian, R. Rach, and N. T. Shawagfeh, On the analytic solution of the lane-emden equation, Foundations of Physics Letters 8 (1995), 161–181.
[2] C. C. Aggarwal, Neural networks and deep learning: A textbook, 2 ed. , Springer, 2023.
[3] I. Ahmad, M. A. Z. Raja, M. Bilal, and F. Ashraf, Neural network methods to solve the lane–emden type equations arising in thermodynamic studies of the spherical gas cloud model, Neural Computing & Applications 28 (2017), no. Suppl 1, 929–944.
[4] H. Aminikhah, Solutions of the singular ivps of lane-emden type equations by combining laplace transformation and perturbation technique, Nonlinear Engineering 7 (2018), no. 4, 273–278.
[5] O. Abu Arqub, A. El-Ajou, A. Sami Bataineh, and I. Hashim, A representation of the exact solution of generalized lane-emden equations using a new analytical method, Abstract and Applied Analysis 2013 (2013), Article ID 378593, 10 pages.
[6] S. Aydinlik, A. Kiris, and P. Roul, An effective approach based on smooth composite chebyshev finite difference method and its applications to bratu-type and higher order lane–emden problems, Mathematics and Computers in Simulation 202 (2022), 193–205.
[7] H. Bassi, Y. Zhu, S. Liang, J. Yin, C. C. Reeves, V. Vlček, and C. Yang, Learning nonlinear integral operators via recurrent neural networks and its application in solving integro-differential equations, Machine Learning with Applications 15 (2024), 100524.
[8] H. Baty, Modelling lane–emden type equations using physics-informed neural networks, Astronomy and Computing 44 (2023), 100734.
[9] V. Calvert, S. Mashayekhi, and M. Razzaghi, Solution of lane–emden type equations using rational bernoulli functions, Mathematical Methods in the Applied Sciences 39 (2016), no. 5, 1268–1284.
[10] M. Chapwanya, R. Dozva, and G. Muchatibaya, A nonstandard finite difference technique for singular lane-emden type equations, Engineering Computations 36 (2019), 1566–1578.
[11] H. Dana Mazraeh and K. Parand, Gepinn: An innovative hybrid method for a symbolic solution to the lane–emden type equation based on grammatical evolution and physics-informed neural networks, Astronomy and Computing 48 (2024), 100846.
[12] M. Dehghan and F. Shakeri, Approximate solution of a differential equation arising in astrophysics using the variational iteration method, New Astronomy 13 (2008), no. 1, 53–59.
[13] S. Deniz and N. Bildik, A new analytical technique for solving Lane - Emden type equations arising in astrophysics, Bulletin of the Belgian Mathematical Society - Simon Stevin 24 (2017), no. 2, 305 – 320.
[14] A. Karimi Dizicheh, S. Salahshour, A. Ahmadian, and D. Baleanu, A novel algorithm based on the legendre wavelets spectral technique for solving the lane–emden equations, Applied Numerical Mathematics 153 (2020), 443–456.
[15] S. H. El-Essawy, M. I. Nouh, A. A. Soliman, H. I. Abdel Rahman, and G. A. Abd-Elmougod, Monte carlo simulation of lane-emden type equations arising in astrophysics, Astronomy and Computing 42 (2023), 100665.
[16] S. M. Ermakov and T. M. Tovstik, Monte carlo method for solving ode systems, Vestnik St. Petersburg University, Mathematics 52 (2019), 272–280.
[17] P. Hiram Guzzi, F. Petrizzelli, and T. Mazza, Disease spreading modeling and analysis: a survey, Briefings in Bioinformatics 23 (2022), no. 4, bbac230.
[18] S. Gümgüm, Taylor wavelet solution of linear and nonlinear lane-emden equations, Applied Numerical Mathematics 158 (2020), 44–53.
[19] T. Hagge, P. Stinis, E. Yeung, and A. M. Tartakovsky, Solving differential equations with unknown constitutive relations as recurrent neural networks, 2017.
[20] G. Hojjati and K. Parand, An efficient computational algorithm for solving the nonlinear lane-emden type equations, International Journal of Mathematics and Computer Sciences 7 (2011), no. 4, 182–187.
[21] G. P. Horedt, applications in astrophysics and related fields, Kluwer Academic Publishers, Dordrecht, 2004.
[22] Z. Huang, D. Z. Huang, T. Xiao, D. Ma, Z. Ming, H. Shi, and Y. Wen, Improving monte carlo tree search for symbolic regression, The Thirty-ninth Annual Conference on Neural Information Processing Systems (2025).
[23] M. Izadi, A discontinuous finite element approximation to singular lane-emden type equations, Applied Mathematics and Computation 401 (2021), 126115.
[24] A. Khaliq J. Long and Kh. M. Furati, Parameter identification for pdes using sparse interior data and a recurrent neural network, Scientific Reports 15 (2025).
[25] R. Kumar, S. Aeri, and D. Baleanu, Artificial neural networks for the wavelet analysis of lane-emden equations: exploration of astrophysical enigma, International Journal of Modelling and Simulation (2024), 1–12.
[26] P. Linz, An introduction to formal languages and automata, 6th ed. , Jones & Bartlett Learning, 2019.
[27] S. Mall and S. Chakraverty, Chebyshev neural network based model for solving lane–emden type equations, Applied Mathematics and Computation 247 (2014), 100–114.
[28] J. Mańdziuk, K. Godlewski, B. Sawicki, and J. Mańdziuk, Monte carlo tree search: a review of recent modifications and applications, Artificial Intelligence Review 56 (2023), 2497–2562.
[29] M. Y. Niu, L. Horesh, and I. Chuang, Recurrent neural networks in the eye of differential equations, 2019.
[30] K. Parand, S. Abbasbandy, S. Kazem, and A. R. Rezaei, An improved numerical method for a class of astrophysics problems based on radial basis functions, Physica Scripta 83 (2011), no. 1, 015011.
[31] K. Parand, A. A. Aghaei, S. Kiani, T. Ilkhas Zadeh, and Z. Khosravi, A neural network approach for solving nonlinear differential equations of lane–emden type, Engineering with Computers (2023).
[32] K. Parand, M. Dehghan, A. R. Rezaei, and S. M. Ghaderi, An approximation algorithm for the solution of the nonlinear lane–emden type equations arising in astrophysics using hermite functions collocation method, Computer Physics Communications 181 (2010), no. 6, 1096–1108.
[33] K. Parand and S. Hashemi, Rbf-dq method for solving non-linear differential equations of lane-emden type, Ain Shams Engineering Journal 9 (2018), no. 4, 615–629.
[34] K. Parand and M. Hemami, Numerical study of astrophysics equations by meshless collocation method based on compactly supported radial basis function, International Journal of Applied and Computational Mathematics 3 (2015), 1053–1075.
[35] K. Parand, M. Shahini, and M. Dehghan, Rational legendre pseudospectral approach for solving nonlinear differential equations of lane–emden type, Journal of Computational Physics 228 (2009), no. 23, 8830–8840.
[36] G. Penent and N. Privault, Numerical evaluation of ode solutions by monte carlo enumeration of butcher series, BIT Numerical Mathematics 62 (2022), 1921–1944.
[37] M. Raissi, P. Perdikaris, and G. E. Karniadakis, Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations, Journal of Computational Physics 378 (2019), 686–707.
[38] R. V. Ramnath, On a class of nonlinear differential equations of astrophysics, Journal of Mathematical Analysis and Applications 35 (1971), no. 1, 27–47.
[39] Z. Sabir, H. Abdul Wahab, M. Umar, M. G. Sakar, and M. A. Zahoor Raja, Novel design of morlet wavelet neural network for solving second order lane–emden equation, Mathematics and Computers in Simulation 172 (2020), 1–14.
[40] E. Saveliev, S. Holt, N. Seedat, D. L. Bentley, J. Weatherall, and M. van der Schaar, Influence-guided symbolic regression: Scientific discovery via LLM-driven equation search with granular feedback, Forty-third International Conference on Machine Learning (2026).
[41] M. Shirazian, A new acceleration of variational iteration method for initial value problems, Mathematics and Computers in Simulation 214 (2023), 246–259.
[42] R. Singh, N. Das, and J. Kumar, The optimal modified variational iteration method for the lane-emden equations with neumann and robin boundary conditions, Eur. Phys. J. Plus 132 (2017), 251.
[43] F. Sun, Y. Liu, J. Wang, and H. Sun, Symbolic physics learner: Discovering governing equations via monte carlo tree search, arXiv: 2205.13134 (2022).
[44] J. Sunday, A. Shokri, R. O. Akinola, K. Victor Joshua, and K. Nonlaopon, A convergence-preserving non-standard finite difference scheme for the solutions of singular lane-emden equations, Results in Physics 42 (2022), 106031.
[45] R. S. Sutton and A. G. Barto, Reinforcement learning an introduction, 2nd ed. , MIT Press, 2020.
[46] R. J. Swift and S. A. Wirkus, A course in ordinary differential equations, Taylor & Francis, 2006.
[47] A. Verma and M. Kumar, Numerical solution of lane–emden type equations using multilayer perceptron neural network method, International Journal of Applied and Computational Mathematics 5 (2019), 141.
[48] A. M. Wazwaz, Adomian decomposition method for a reliable treatment of the emden–fowler equation, Applied Mathematics and Computation 161 (2005), no. 2, 543–560.
[49] A. M. Wazwaz, Solving two emden–fowler type equations of third order by the variational iteration method, Applied Mathematics and Information Sciences 9 (2015), 2429–2436.
[50] X. Yang, Y. Liu, and G. Park, Parameter estimation of uncertain differential equation with application to financial market, Chaos, Solitons & Fractals 139 (2020), 110026.
[51] A. Yildirim, A dna-inspired physics-informed machine learning framework for singular lane–emden type equations, Astronomy and Computing 58 (2027), 101183.
[52] Z. Yu, J. Ding, Y. Li, and D. Jin, Symbolic regression via mdlformer-guided search: from minimizing prediction error to minimizing description length, 13th International Conference on Learning Representations (ICLR) (2025), 65306–65333.
[53] Ş. Yüzbaşı and M. Sezer, An improved bessel collocation method with a residual error function to solve a class of lane–emden differential equations, Mathematical and Computer Modelling 57 (2013), no. 5, 1298–1311.
[54] A. Yıldırım and T. Öziş, Solutions of singular ivps of lane–emden type by homotopy perturbation method, Physics Letters A 369 (2007), no. 1, 70–76.

Articles in Press, Accepted Manuscript
Available Online from 23 November 2026

  • Receive Date 16 August 2024
  • Accept Date 22 November 2026