1. Introduction and Summary
Machine learning has been used for several years in multiple areas of science. More recently, Large Language Models (LLMs) also started to appear as useful tools for making scientific discoveries. The progress is most apparent in mathematics. Recent milestones include the new solutions of selected Erdős’ problems and other problems selected by experts [
1,
2], various discoveries using a combination of evolutionary programming and LLMs [
3], and displaying excellent performance in mathematical competitions such as the International Mathematical Olympiad [
4].
In physics, machine learning has already been used in multiple research areas [
5], and applications of the most recent versions of LLMs are starting to appear. We do not attempt to review all contributions in this topic, instead we just mention a few selected papers [
6,
7,
8,
9,
10,
11,
12].
Given the success of LLMs in mathematics, it is a very natural idea to explore their usefulness in mathematical physics. The field of integrability is a specific area of mathematical physics, which is known for its proximity to pure mathematics. Integrable models are special: they can be solved exactly. This means that many physical quantities can be computed exactly, often in closed form expressions, without the need for approximations or numerical simulations. The mathematical manipulations rely on special algebraic structures such as the Yang–Baxter relations [
13].
Machine learning techniques have already been used in integrability [
14,
15,
16] (and also for classical spin chains [
17,
18]); however, to the best of our knowledge, the capabilities of LLMs have not yet been explored in a systematic way. There exist benchmarks for LLMs in mathematics [
19] and also in physics [
20,
21], but as far as we know, these benchmarks do not include questions/problems in integrability. This gives us motivation for our present study: we intend to explore the capabilities of LLMs in research-level questions in integrability.
In this paper we focus on a hallmark task of this field: computing the Bethe Ansatz solution of integrable spin chain models. This involves constructing the exact coordinate space wave function of selected interacting and integrable quantum spin chains; the method goes back to the solution of the Heisenberg spin chain by Hans Bethe in 1931 [
22]. Our goal is to explore to what extent an LLM can provide the Bethe Ansatz solution of a model, for which the solution was not yet published in the literature.
We use ChatGPT 5.2 Pro and 5.4 Pro to perform the computations, both analytical and numerical. We use both the web interface of the LLM and also the command line program codex. Both the web interface and the command line version can write and run python scripts. In the case of the web interface, there are computational limitations for running scripts; therefore, for larger computations it is advised to run the scripts locally.
We also use the LLM to contribute to the text of this manuscript.
Section 1 and
Section 2 are written exclusively by the human authors, but the other sections are mostly AI written, with human supervision. This includes overall editing and making various modifications.
The structure of this paper is as follows. Below we summarize our key findings; we intend this summary for both experts and non-specialists. Afterwards we discuss the potential checks of the output of the AI and the types of mistakes that the AI produced. In
Section 2 we give a technical description of the models to be solved, and in
Section 3 we summarize the key ideas behind the Bethe Ansatz. Afterwards, in
Section 4,
Section 5,
Section 6 and
Section 7 we solve the three selected models (the solution of the third model is presented in two sections). Finally, we present numerical data for the predicted spectra in the
Appendix A.1,
Appendix A.2 and
Appendix A.3.
An overall outlook is given earlier at the end of the Introduction, in
Section 1.4.
We also publish the output of the LLM for a selected example prompt; this can be found as an ancillary material added to this document. This output concerns the solution of one of our models, but it is not the full solution and it does not coincide with the corresponding parts from the main text. The actual material of this paper was compiled using several calls to the LLM, and the
Supplementary Materials serves as an illustration of the work process.
1.1. A Non-Technical Summary of This Work
We used ChatGPT 5.2 Pro and 5.4 Pro from OpenAI. We instructed this LLM to find solutions to three integrable spin chain models, whose Bethe Ansatz solution is not available in the literature.
We chose three spin chain models that we named Y1, Y2 and Y3. Below we describe the three models, and give a few remarks about their physical properties and the difficulty level associated with their solution. Assessing this difficulty level involves personal judgment. However, we added these remarks so that non-specialists could have a rough assessment of the results. The concrete definition of the three models (together with some additional technical details) will be given later in
Section 2.
Model Y1 is a relatively simple model, which is related to the XXZ Heisenberg chain. The connection is not immediately obvious, but once it is understood, the solution of the model becomes very simple. We instructed the LLM to solve the model without prompting it to find connections to known models.
Computing the Bethe Ansatz for this model is a good learning exercise for an undergraduate student. In contrast, the connection to the XXZ chain can be overlooked, and even experts might miss it.
Model Y2 is a previously unpublished model. It is physically interesting, because it breaks left–right reflection invariance at the macroscopic level. It has two types of excitations over the pseudovacuum; therefore, we expected that it can be solved by the so-called nested Bethe Ansatz.
The solution of this model could be a project for an MSc student, or perhaps a learning exercise for a PhD student in the first year. In this paper we do not compute the transport properties of the model, but we believe that the model could be interesting for Generalized Hydrodynamics due to the explicit breaking of space reflection invariance.
Model Y3 was published earlier in [
23], but its solution was not given there. It is an
-symmetric spin chain model with four-site interactions. Simple arguments reveal that the model has two types of excitations over the pseudovacuum; therefore, we expected a solution via the nested Bethe Ansatz. However, this time there is no
-symmetry at the nesting level, which makes the model unusual. In fact, the model turns out to have an 8-vertex type
R-matrix at the nesting level. Furthermore, this particular
R-matrix is of the free fermion type. This free fermionic property was found by the LLM and it was a surprise to us.
The difficulty level of this solution corresponds to an advanced project for a PhD student, or perhaps a learning exercise for an early postdoc.
Now we summarize the results and our experiences:
The LLM was able to compute the Bethe Ansatz solution of all these models (sometimes with human interventions). Notably, it recognized the free fermionic structure of model Y3, which makes its solution possible despite the lack of -invariance on the nesting level. Furthermore, it discovered a simple eigenvector for the auxiliary transfer matrix on the nesting level, which eventually leads to simple but non-trivial Bethe equations and Bethe states, at least for a subset of the eigenstates of the model. Therefore, we believe that these results would deserve publishing if they were derived by a human: they appear as interesting additions to the theory of integrable models.
The LLM makes mistakes, but it is able to correct them, once prompted. Therefore, intermediate and final results cannot be trusted without independent checks. We discuss this in more detail in
Section 1.2 below.
The LLM writes and runs python scripts to check certain parts of the computation. An independent reading and running of the scripts can be useful for assessing the correctness of the solution. Hallucinations can appear in the output of the LLM even after it wrote and ran correct scripts; see
Section 1.2 below.
The LLM is able to summarize the solution and present it in a form which fits the style and requirements of a scientific journal.
There is a dramatic difference in the performances of the free and Pro versions of ChatGPT 5.2 and 5.4. In the case of model Y3 we ran the same prompts also for the free versions, and the LLM was not able to compute the Bethe Ansatz solution. In fact, it did not make any useful steps.
1.2. Checking the Output of the AI
Our specific problems are such that they are theoretical in nature, but can be checked easily in concrete examples.
We aim at computing the spectrum of integrable Hamiltonians in a finite volume. The energy eigenvalues are computed from the so-called Bethe rapidities, which are solutions to the Bethe equations. They form a set of coupled non-linear equations in several variables. In small system sizes it is relatively easy to find concrete numerical solutions, from which the corresponding energy eigenvalue can be computed. These numerical values can then be compared to exact diagonalization.
Mistaken Bethe equations almost always lead to incorrect energy eigenvalues. Therefore, a numerical check of the energies for a few randomly selected solutions is typically enough to judge the correctness of the solution. This procedure has minor time cost: the numerical solution of the Bethe equations is performed by the LLM (it can be checked separately by us), and exact diagonalization in small volumes is typically enough to judge the correctness.
Interestingly, we found that “hallucination” of the LLM can appear in the numerics too. We observed runs where we instructed the LLM to compare its numerical predictions (from the Bethe equations) with exact diagonalization. In such a case the LLM writes python scripts, it runs the scripts, and analyzes the outputs. We found that the LLM sometimes hallucinated the numbers for the energy eigenvalues; those values were actually not there in the spectrum. In our experiments, the hallucinations appeared only in those cases when there was a mistake in the Bethe Ansatz computation itself, and the correct numerics would have uncovered the mismatch. After such occurrences we decided to perform the exact diagonalization by a separate program in each case.
1.3. Types of Mistakes of the LLM
We found multiple types of mistakes in the analytical calculations of the LLM. Examples include:
Sometimes the LLM assumed that a certain model was solvable by a simple Bethe Ansatz, and it extended Bethe equations from the two-particle case to the general M-particle problem, without checking all the conditions for the correctness of the Ansatz. Once confronted with the mismatches in the numerical data, it realized the mistake and it went on to compute the nested Bethe Ansatz. We never had to explicitly instruct the LLM to carry out nested Bethe Ansatz for any of the models.
Sometimes minor mistakes were made. Interestingly, these mistakes were such that they could easily occur also with a human researcher, before finalizing all conventions and performing all possible checks. For example, a typical mistake was that in the Bethe equations the S-matrix had a wrong order of the momenta, or the LLM would use the so-called checked R-matrix instead of the standard one, or there was an extra minus sign in the Bethe equations, etc.
Sometimes intermediate formulas had mistakes, even though the final formulas were correct.
1.4. Discussion and Outlook
1.4.1. The Solution of Model Y3
Using the LLM, we computed the solution of model Y3, to be presented below. This model appears interesting due to its unique Bethe Ansatz structure: it is interacting, solvable by nested Bethe Ansatz, where the nesting level has free fermions without -symmetry. Our solution produces all eigenvectors of the second-level Bethe Ansatz and likely most eigenvectors of the actual model. We did not investigate the completeness of the Bethe Ansatz (We expect that there can be singular eigenstates, which could correspond to limits of Bethe wave function with special, singular rapidities, similar to the case of the XXZ spin chain. However, we did not investigate this question. On the other hand, the completeness of the second level Bethe Ansatz follows from the free fermionic computations.).
It might be that there is a simpler solution than ours. The current solution is well adapted for numerical studies, but inconvenient for taking the thermodynamic limit. Therefore, alternative formulations are also desirable.
1.4.2. General Outlook
The LLM displayed an excellent performance on the selected research-level questions. The difficulty level was such that they could be good projects for a PhD student, and the results could have been published if there was no AI involved. There is considerable gain also for an expert, due to the hugely reduced time in working out the details of the solution.
It would be interesting to attack other problems in the field of integrable models, with increasing difficulty levels. It is possible that solutions will be found for open problems that are difficult even for the experts.
All of this progress calls for automated verification of the results of the LLM. In our concrete problems a quick check was possible by comparing to exact diagonalization. However, such an easy route might not always be available. It is desirable to have proof-checking mechanisms, similar to those developed in mathematics; see for example [
24]. For recent contributions towards this goal in physics and computer science see [
25,
26,
27].
Finally we mention the question of benchmarking AI using open problems. There are online repositories dedicated to open problems, both in mathematics and in physics, and there are various initiatives to build benchmarks (see for example [
2,
20,
21,
28,
29,
30,
31]). It is our impression that mathematical physics is underrepresented in these lists. In particular, problems from the field of integrable models have not yet been added. This research area can be seen as having overlaps with both physics and pure mathematics; therefore, it could be useful to add problems from this field to the benchmarks.
An actual benchmark that is useful in practice has to satisfy a number of criteria. For example, it should have problems of varying difficulty, such that all solutions are known to the humans, and such that the difficulty level continuously tracks the development of the LLMs. We do not claim that the solution of our three selected spin chain models is in itself a useful benchmark. We simply just claim that such problems could be added to existing or upcoming benchmarks, thereby increasing their cover of theoretical sciences.
2. Integrable Spin Chain Models
We consider finite spin chains with local dimension 2; therefore the Hilbert space is .
We treat translationally invariant local Hamiltonians:
Here
is the operator density localized around the site
j. We always treat local models, which means that
is a short-range operator which spans a finite number of sites. In the concrete examples the range will be 3 and 4. We always treat periodic boundary conditions, because in the typical case this choice leads to the simplest possible solutions of the models.
There are various definitions and diagnostic criteria of integrability [
32]. We will work with the definition that a local spin chain is integrable, if there exists a family of charges
, all of them with local operator densities, which form a commuting family such that the Hamiltonian is a member of the family. We will use a convention such that the index
coincides with the range of the operator density of
; in this case the possible values of
form a subset of the natural numbers.
A prominent example is the XXZ spin chain, whose Hamiltonian density can be written as
Here we used the notation
for the Pauli operators, and
is the anisotropy parameter.
In the case of
the model is the XXX chain, whose solution was computed by Hans Bethe [
22]. Bethe proposed an Ansatz for the explicit coordinate space wave function, whose validity can be confirmed by direct computations. The anisotropic chain was first solved in [
33].
Now we summarize simple commutativity relations that guarantee the integrability of spin chain models.
The integrability of the nearest neighbor interacting spin chain models can be established by the Algebraic Bethe Ansatz methods, which ultimately rely on particular solutions to the Yang–Baxter equations [
34]. However, integrability can be checked more easily via the so-called Reshetikhin condition. The statement is that if a Hamiltonian is derived from a solution of the Yang–Baxter relation, then we have a commutativity
where
where
and
is a two-site operator density. Both
and
originate from derivatives of the
R-matrix, which solves the YB relations. The precise connections will not be used here.
Recently a considerable amount of work was devoted to finding theorems for the opposite direction: proving that an infinite tower of charges exist, if there is a
and
that satisfy the above commutativity relation [
35,
36].
An extension of this framework to Hamiltonians with multi-site interactions was presented in [
23]. A generalization of the Reshetikhin condition was given as follows. Consider a translationally invariant Hamiltonian with a three-site interaction
. Then the condition is that
where
is an extensive five-site operator with its density being
where
is another three-site operator. The extension to longer interaction ranges follows along the same lines.
It was conjectured in [
23] that most solutions of these conditions actually lead to a medium range integrable model with a tower of conserved charges. The precise conditions for the validity of this conjecture have not been established yet. However, this generalized condition was used successfully in [
23] to find new integrable models, and an example is our model Y3 treated below. Furthermore, we found the unpublished model Y2 using the same formalism.
All of this means that the integrability of the models Y2 and Y3 is not yet rigorously established, because the corresponding solutions of the Yang–Baxter relations have not yet been found. However, the existence of the Bethe Ansatz, together with a numerical check of the concrete predictions for the energy eigenvalues up to 4-particle level strongly suggests that the models are indeed integrable.
It is an interesting question how the models Y2 and Y3 fit into existing classifications of integrable spin chains, with particular focus on quantum groups and other algebraic structures. Currently it is not known whether there are any relations between these models and established classifications. It is likely that standard classifications of integrable Hamiltonians based on known algebraic structures do not yield all possible integrable models.
We consider three models, for which the Bethe Ansatz solution has not yet been presented in the literature.
In interpreting and solving the models we will use the following terminology: the state with all spins up is called the reference state (or pseudovacuum). Down spins embedded into a sea of up spins can be seen as the excitations or particles.
The first model is given by
The model has a three-site density, which is most conveniently written as
In this representation the operator density spans four sites, but each term is a three-site operator.
is a real coupling constant.
We believe that this particular Hamiltonian has not yet appeared in the literature. However, there is a direct connection to the XXZ chain. To see this connection, consider the Hamiltonian
, where
This model can be seen as a twisted version of the XXZ chain. More precisely, it is unitarily equivalent to the model given by (
2) in every finite volume
L which is a multiple of four. In other volumes it can be seen as the XXZ chain with twisted boundary conditions.
It turns out that
from (
9) can be written as
and direct computations in finite volumes show that
In other words,
is simply the first higher conserved charge for the nearest neighbor model given by
. In particular, the Reshetikhin condition (
3) is satisfied with
. The operator
can also be interpreted as the energy current in the model
.
All of this implies that the eigenstates of will coincide with those of . For the standard Bethe Ansatz applies, with minor differences due to the twist in the hopping terms.
This explains why solving is a good first problem for the LLM: the Bethe Ansatz eigenstates have a relatively simple structure; nevertheless the Hamiltonian itself appears new, and it is unlikely that an LLM would discover the connections, unless specifically prompted.
When asked to find the exact eigenstates, the LLM did not mention this connection. However, when we asked if there is any connection between and any known model in the literature, it found the connection.
This is a Hamiltonian which was earlier discovered by the authors but remained unpublished so far. It is given by
with
where
and
For generic
this model breaks the left–right reflection symmetry which is usually present in integrable models. However, space reflection combined with complex conjugation is an invariance of the model; therefore we say the model is PT-symmetric.
For the model can be seen as the union of two XX models, because particles can freely hop by two sites, leading to a complete dynamical separation of the even and odd sublattices. This also means that there are two symmetries in the model, those corresponding to the two sublattices.
Turning on the particles can still hop only within each sublattice, the two symmetries survive; however, we obtain an interaction term between the sublattices.
This dynamical picture suggests that the model is solvable by a nested Bethe Ansatz, where two excitation types correspond to particles propagating on the individual sublattices.
This model is given by
with
where
is the permutation operator acting on two qubits. The Hamiltonian only involves operators that are symmetric with respect to a global
symmetry; therefore the model itself is rotationally symmetric. We also note that
is proportional to the projector to the
-singlet prepared on sites
j and
k.
The model was published in Reference [
23], where the authors classified all
-symmetric, space reflection symmetric and translationally invariant Hamiltonians with four-site interactions. In fact, this was the only new model that appeared in the classification once simple variants of the XXX model were excluded. The Bethe Ansatz solution of the model was not given in [
23], and none of us considered the problem since the publication of [
23].
Simple arguments reveal that this model should be solvable by the nested Bethe Ansatz. The reference state is an eigenstate with zero energy. The propagation of isolated particles is generated only by the term including , because the first product acts identically as zero on all configurations where a single down spin is embedded into a sea of up spins. It follows that isolated particles can hop by two sites only; therefore, they will propagate on the odd and even sublattices. We obtain that once again there will be two types of excitations. The first term acts in a non-trivial way only if two excitations come close to each other. However, there is a crucial difference here as opposed to the model Y2: the interaction terms are such that they can move particles between the sublattices. Therefore, this model does not conserve “excitation type”.
Based on this simple analysis we expect a non-trivial nested Bethe Ansatz solution, where we cannot expect to find “particle conservation” on the nesting level.
The reader might wonder whether the models Y2 and Y3 could be equivalent to previously known integrable models via non-trivial mappings. Generally we cannot exclude such a situation. The Bethe equations and the energy formulas do not look like anything that we recognize; however, we cannot exclude a duality transformation that would bring these equations into an already known form.
4. Solution of Model Y1
We rewrite the Hamiltonian (
8) as
We see explicitly that the number of particles (down spins) is conserved.
In the one-magnon sector, one finds directly
which gives the plane-wave eigenvalue
In the ordered two-magnon sector, the bulk equation for
is
so the ansatz
has additive energy
. The collision equations obtained from the exact action of
H on
and
are
After substituting the two-plane-wave form and the additive energy, the distance-two equation reduces to
and the distance-one equation is the same relation multiplied by
. Hence, for generic roots with
,
The exceptional manifold
yields a zero-energy degenerate sector not fixed by the scalar
S-matrix and must be treated separately [
40].
For three magnons, configurations with a single short gap reproduce the two-body collision equation with a spectator plane wave. The genuinely new local intersection patterns are
Projecting
onto these basis states gives
Now write
and abbreviate
. With
, the adjacent exchange rule gives
For the four displayed three-particle equations, we find that the above ansatz is a solution. Thus the three-particle contact equations impose no new constraint beyond the two-body relation: the scattering is fully factorized and there is no diffraction.
With this consistency check in hand, we make the Ansatz for the generic
N-magnon wavefunction
with exchange rule
. Because
S is a scalar, the exchange relations are path independent, and with
one may take
The energy remains additive,
and periodic boundary conditions
give the Bethe equations
where
. At
, and away from the exceptional pairwise manifolds
, one recovers
and the free-fermion quantization condition
.
In this work we do not prove the correctness of the
N-particle Bethe Ansatz based on
H, because eventually we know that
H is just a higher charge of an established model. However, we confirm the correctness of the Bethe equations by numerical checks. This is presented in
Appendix A.1.