Organizations: School of Physical Science and Technology, Soochow University, 333 Ganjiang Road, Suzhou 215006, P.R. China · Institute for Advanced Study, Soochow University, 333 Ganjiang Road, Suzhou 215006, P.R. China · Mandelstam Institute for Theoretical Physics, School of Physics and NITheCS, University of the Witwatersrand, Johannesburg 2050, South Africa · NSF AI Institute for Artificial Intelligence and Fundamental Interactions (IAIFI) and Department of Physics, Northeastern University, Boston, MA 02115, USA
Based on a transformer based sequence-to-sequence architecture combined with a dynamic batching algorithm, this work introduces a machine learning framework for automatically simplifying complex expressions involving multiple elliptic Gamma functions, including the q-θ function and the elliptic Gamma function. The model learns to apply algebraic identities, particularly the SL(2,Z) and SL(3,Z) modular transformations, to reduce heavily scrambled expressions to their canonical forms. Experimental results show that the model achieves over 99% accuracy on in-distribution tests and maintains robust performance (exceeding 90% accuracy) under significant extrapolation, such as with deeper scrambling depths. This demonstrates that the model has internalized the underlying algebraic rules of modular transformations rather than merely memorizing training patterns. Our work presents the first successful application of machine learning to perform symbolic simplification using modular identities, offering a new automated tool for computations with special functions in quantum field theory and the string theory.