Machine learning modularity

arXiv:2601.01779 · hep-th, cs.LG · Submitted 2026-01-05 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: Today's paper: "Machine learning modularity".

Jane: The gist The proposed work introduces a machine learning framework that uses a transformer-based sequence-to-sequence architecture and dynamic batching to automatically simplify complex expressions involving multiple elliptic Gamma functions,

Tom: First, who's behind it and why it matters.

Paper summary: Tom: So, we're wrapping up this look at "Machine learning modularity." The paper is about using transformer models to automatically simplify very complicated expressions involving multiple elliptic Gamma functions and the q-theta function.

Jane: That's right, Tom. It essentially shows how an AI framework can learn those specific algebraic rules, like SL(two Z) and SL(three Z), to take a super scrambled math problem and turn it into its simplest form.

Lu: The authors are the core team here at Tsinghua University who are really pushing the idea of using representation learning for these types of problems.

Meng: I'm still thinking about how much data they needed to train this thing up against all those different sampling methods, like Bertrand I, II, and III.

Lalam: The model achieved accuracy numbers that suggest it’s not just guessing; it seems to have internalized the underlying structure of the modular transformations itself.

Tom: Yeah, and those results are pretty solid because they maintained good performance even when they tested deeper scrambling depths, which is a big deal for robustness.

Jane: It means this isn't just a neat trick for one specific problem; it shows an approach that could be used to automate symbolic manipulation in areas like quantum field theory or string theory.

Lu: The authors are aiming for modular factorization of supersymmetric lens indices on L(p, q) times S1, which is where they see the most direct physical application.

Tom: So, the implication is that we’re building a tool that can help simplify complex mathematical structures in physics calculations much faster than by hand.

Jane: It opens up a new way for researchers to tackle these hard problems by letting the machine handle the tedious simplification step.

Meng: From my side, I'm still looking at the infrastructure needed to actually run this thing reliably on big datasets without it breaking at scale.

Lalam: The paper sets a good precedent for how we can use deep learning to capture and apply complex mathematical symmetries in symbolic computations.

Tom: So, while the accuracy numbers are strong, we still need to see if this model can handle the sheer complexity of real-world, messy expressions in a production setting.

Conclusion: Tom: So, to wrap up this look at "Machine learning modularity," we’re talking about how this paper uses transformer models to automatically simplify really complex expressions involving multiple elliptic Gamma functions and the q-theta function.

Jane: That's right, Tom. Basically, it shows an AI framework that learns specific algebraic rules, like SL(two Z) and SL(three Z) modular transformations, to turn super scrambled math problems into their simplest forms.

Lu: The authors are the core team at Tsinghua University who are pushing the idea of using representation learning for these kinds of problems.

Meng: I'm still thinking about how much data they needed to train this thing up against all those different sampling methods, like Bertrand I, II, and III.

Lalam: The model achieved accuracy numbers that suggest it’s not just guessing; it seems to have internalized the underlying structure of the modular transformations itself.

Tom: Yeah, and those results are pretty solid because they maintained good performance even when they tested deeper scrambling depths, which is a big deal for robustness.

Jane: It means this isn't just a neat trick for one specific problem; it shows an approach that could be used to automate symbolic manipulation in areas like quantum field theory or string theory.

Lu: The authors are aiming for modular factorization of supersymmetric lens indices on L(p, q) times S1, which is where they see the most direct physical application.

Tom: So, the implication is that we’re building a tool that can help simplify complex mathematical structures in physics calculations much faster than by hand.

Jane: It opens up a new way for researchers to tackle these hard problems by letting the machine handle the tedious simplification step.

Meng: From my side, I'm still looking at the infrastructure needed to actually run this thing reliably on big datasets without it breaking at scale.

Lalam: The paper sets a good precedent for how we can use deep learning to capture and apply complex mathematical symmetries in symbolic computations.

Tom: So, while the accuracy numbers are strong, we still need to see if this model can handle the sheer complexity of real-world, messy expressions in a production setting.

Jane: Next time, we’ll look at how they actually reconstruct the phase between a complicated expression and its simplified version using their ratio method.

Yi Fan, Vishnu Jejjala, Yang Lei

School of Physical Science and Technology, Soochow University · Institute for Quantum Science, Soochow University · Center for Astronomy and Astrophysics, Department of Physics, Fudan University

hep-th, cs.LG

Submitted: 2026-01-05

Updated: 2026-10-07

Comments: 48 pages, 7 figures, 6 tables; v2: to be published in PRD, discussions and applications added

DOI: 10.1103/j99v-l6zq

Code: https://github.com/stringer07/ML_Modularity

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 83/100

The gist: The gist The proposed work introduces a machine learning framework that uses a transformer-based sequence-to-sequence architecture and dynamic batching to automatically simplify complex expressions

Key concepts

Transformer-based Sequence-to-Sequence Architecture
This is a type of deep learning model designed to process and generate sequences of data, much like how it handles text. It uses an attention mechanism that allows it to weigh different parts of the input expression simultaneously, enabling it to learn complex, long-range dependencies necessary for symbolic manipulation.
SL(2, Z) and SL(3, Z) Modular Transformations
These are specific mathematical operations used in number theory and geometry. They represent transformations that map points on a surface (like the upper half-plane) to other points while preserving certain geometric properties. The model learns how to use these transformations algebraically to simplify complicated expressions into their simplest, standard forms.
Elliptic Gamma Functions and q-theta Functions
These are special mathematical functions used in advanced physics and mathematics, particularly in areas like quantum field theory. They are complex functions that appear when dealing with modular forms and string theory, requiring sophisticated methods for simplification.

Terminology

Summary

The gist The proposed work introduces a machine learning framework that uses a transformer-based sequence-to-sequence architecture and dynamic batching to automatically simplify complex expressions involving multiple elliptic Gamma functions, including the q-theta function and the elliptic Gamma function, by applying algebraic identities such as SL(2, Z) and SL(3, Z) modular transformations to reduce scrambled expressions to their canonical forms<ref:2601.01779#pg6>

Machine Learning Approach

The model is trained to apply algebraic identities, particularly the SL(2, Z) and SL(3, Z) modular transformations, to reduce heavily scrambled expressions to their canonical forms<ref:2601.01779#pg5> The framework tests whether generic points in the upper half-plane can be mapped into the fundamental domain with corresponding SL(2, Z) matrices determined algorithmically<ref:2601.01779#pg4> The training data comprised 1,000,000 points generated equally from four sampling methods: the hyperbolic measure (truncation radius Rh = 2) and the Bertrand I, II, III schemes<ref:2601.01779#pg6> The model achieves an average accuracy of 93.9% across all test sets<ref:2601.01779#pg6>

Data Generation and Sampling

The data generation process involves sampling points according to four different measures on the Poincaré disk, including the hyperbolic measure, Bertrand I (random chord endpoints), Bertrand II (Euclidean area-uniform sampling), and Bertrand III (random radial distance of the chord midpoint)<ref:2601.01779#pg5> The hyperbolic measure samples points near the boundary of the Poincaré disk and near the real axis in the upper half-plane<ref:2601.01779#pg4> The algorithm employed is Algorithm 1, which first reduces a point to its fundamental domain using SL(2,Z) transformations and then stores it<ref:2601.01779#pg5>

Modular Function Simplification

The model is trained in a supervised manner to reproduce target expressions obtained from exact symbolic reduction, minimizing the cross-entropy loss which encourages the model to reproduce canonical representations faithfully<ref:2601.01779#pg5> The task involves identifying a canonical representative by reducing the number of q-theta and elliptic Gamma functions throughout the procedure<ref:2601.01779#pg6> For q-theta functions, the model is trained to simplify complicated products of theta(z; τ) functions into compact standard forms<ref:2601.01779#pg6>

Verification and Robustness

The model's ability to predict simplifications under modular transformations is verified by checking if the logarithmic ratio has the expected quadratic dependence on z, which is tested by evaluating the fourth finite difference of ln(fpred/finput) and verifying it vanishes<ref:2601.01779#pg6> The model achieved an accuracy of 99.96% on the in-distribution test set if the transformation only involves SL(2, Z) type transformation<ref:2601.01779#pg6> The model retained a robust accuracy of 93.02% even on an out-of-distribution parameter space where scrambling depths (ns > 6) were considered<ref:2601.01779#pg6>

Phase Reconstruction

For the q-theta dataset, once both the complicated expression and the simplified expression are given, the relative phase can be reconstructed directly from their ratio by iteratively applying difference equations of the elliptic Gamma function<ref:2601.01779#pg5> The total cocycle phase is obtained by summing all B(zk; τk) contributions, resulting in a quadratic form Qrel(z, τ) = α2(τ)z squared + α1(τ)z + α0(τ)<ref:2601.01779#pg5> For the elliptic Gamma function dataset, the desired Gamma phase is recovered by iteratively applying difference equations to determine the cubic polynomial P(z, τ, σ) from theta phases<ref:2601.01779#pg5>

Physical Applications

A natural physical application of the present framework arises in the modular factorization of supersymmetric lens indices on L(p, q) × S1[2601.017795] The machine-learning framework is designed precisely for this task, identifying an equivalent canonical representative containing with reduced elliptic Gamma function content<ref:2601.01779#pg6> This suggests the framework may provide a useful symbolic tool for investigating more general factorization problems in Seifert three-manifolds M3 × S1[2601.017795]

The paper is 2601.017794. The authors are ordered alphabetically and should all be viewed as co-first authors<ref:2601.01779#pg5> The arXiv identifier is arXiv:2601.01779v2 [hep-th] 7 Oct 2026<ref:2601.01779#pg5>.

--- Page 33 ---

A Direct reconstruction of the phase A.1 q-θ phase For the q-theta dataset, once the complicated expression and the simplified expression are both given, the relative phase can be reconstructed directly from their ratio<ref:2601.01779#pg5> In this appendix we summarize the reconstruction algorithm and work out explicitly the example displayed in Table 5<ref:2601.01779#pg5> Each theta factor appearing in the dataset is first put in the normalized form θ(z; τ + n) (A.1) All phases below are understood modulo 2, since only the factor e iπQ appears in the transformation formula<ref:2601.01779#pg5> The reconstruction algorithm proceeds as follows<ref:2601.01779#pg5> 3 Starting from (z, τ), evaluate the resulting word from left to right<ref:2601.01779#pg5> The total cocycle phase is obtained by summing all B(zk; τk) contributions<ref:2601.01779#pg5>

--- Page 35 ---

A.2 Worked example corresponding to Table 5 We now apply the above procedure to the example used in Table 5 After the normalization above, the simplified expression is Fsimple = θ(z; −τ−2; −4τ−7 −τ−2 θ(z; −3τ−2; −2τ−1 −3τ−2 θ(z; −5τ+1; 6τ−1-5Τ+1, (A.13) while the corresponding complicated expression is Fcomplicated = θ(z; −3Τ+1; −5Τ+2 −3Τ+1 θ(z; 3Τ+2; −4Τ−3 3Τ+2 θ(z; 6Τ+11; 5Τ+9 6T+11 θ(z; 16T−7; 9T−4 16T−7 θ(z; τ +1; 6τ +5 τ +1 θ(z; −3Τ−2; −1۱τ−7 −3Τ−2 θ(z; 5Τ−2; 1-3τ+5Τ−2 2 θ(z; −6Τ+1; −1۱τ+2 −6T+1, (A.13)

--- Page 37 ---

Detailed decomposition for the first canonical factor Consider the factor θ(z; −τ−2; −4Τ−7 −τ−2, A1 = (−4-7 −1-2) (A.14) We decompose A1 by the Euclidean algorithm<ref:2601.01779#pg5> Recursion round 1. Since c = −1!= 0, we compute q = rounda c = round(4) = 4 (A.15) Then T−4A1 = (–4 −7 −1 −2) (–2-3-2) (A.17) and therefore A′1 = ST −4A1 = ST−qA(A.6)<ref:2601.01779#pg5> The new lower-left entry is c’ = 0, so the recursion terminates<ref:2601.01779#pg5>

--- Page 38 ---

Collecting the nonzero contributions, the cocycle phase is Q1 = (−2z − 1) + z 2τ + 2zτ−z + τ 6−1/6+1/6(τ + 2), (A.28)

--- Page 40 ---

Thus the two expressions in Table 5 satisfy the exact relation Fcomplicated = e iπQrel(z, τ)Fsimple<ref:2601.01779#pg5>

--- Page 43 ---

A.2.4 Worked example corresponding to Table 6 We now apply this ratio method to the example in Table 6 The complicated expression contains the following three factors:

Improvements for AI systems

  1. Precise Symbolic Simplification of Complex Expressions: The improved system can identify an equivalent canonical representative containing with reduced elliptic Gamma function content, performing symbolic transformations between equivalent expressions based on modular identities, such as those involving SL(2, Z) and SL(3, Z) modular transformations.

  2. Robust Identification of Canonical Representatives: The model can be trained to reproduce simplified forms from scrambled inputs while maintaining high accuracy (e.g., 99.96% for SL(2, Z) transformations), demonstrating a robust capacity to capture the structural rules of composite modular transformations.

  3. Accurate Reconstruction of Modular Cocycles: The system can reconstruct the modular cocycle deterministically using the algorithm presented in Appendix A, allowing it to determine the full transformation by iteratively applying the difference equations of the elliptic Gamma function and summing B(zk; τk) contributions to find Qcan.

  4. Handling Extrapolation Beyond Training Data: The improved framework exhibits a robust ability to generalize, maintaining high accuracy of 93.02% on extrapolation tasks involving parameter regimes excluded from training, confirming that the learned mapping generalizes well beyond the symbolic expressions encountered during training.

  5. Application in Physical Theory Analysis: The framework can be applied to the modular factorization of supersymmetric lens indices on L(p, q) × S1, serving as a useful symbolic tool for investigating these more general factorization problems related to partition functions in AdS/CFT.

Abstract

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.

Sources

Related papers