A Machine Learning Approach to Duality in Statistical Physics
Authors: Prateek Gupta
Andrea E. V. Ferrari
Nabil Iqbal
Venue: ICML 2025 poster (2025)
Keywords: Duality
Statistical Mechanics
Primary area: applications->chemistry_physics_and_earth_sciences
TL;DR: We formulate the discovery of dualities in lattice statistical mechanics as an optimization problem

Abstract: The notion of duality -- that a given physical system can have two different mathematical descriptions -- is a key idea in modern theoretical physics. Establishing a duality in lattice statistical mechanics models requires the construction of a dual Hamiltonian and a map from the original to the dual observables. By using neural networks to parameterize these maps and introducing a loss function that penalises the difference between correlation functions in original and dual models, we formulate the process of duality discovery as an optimization problem. We numerically solve this problem and show that our framework can rediscover the celebrated Kramers-Wannier duality for the 2d Ising model, numerically reconstructing the known mapping of temperatures. We further investigate the 2d Ising model deformed by a plaquette coupling and find families of ``approximate duals''.  We discuss future directions and prospects for discovering new dualities within this framework.

A Machine Learning Approach to Duality in Statistical Physics
Prateek Gupta Andrea E. V. Ferrari 23
Nabil Iqbal
Abstract
Background on duality: Consider statistical physies model with microstates and Hamiltonian functional H[3,0], o), where / are macroparameters such as the tem- perature. The model is determined by its partition function 7 E_E.
The notion of duality- - that a given physical sys- tem can have two different mathematical descrip- tions - is a key idea in modern theoretical physics. Establishing a duality in lattice statistical mechan- ies models requires the construction of a dual Hamiltonian and a map from the original to the dual observables. By using neural networks to parameterize these maps and introducing loss function that penalises the difference between cor- relation functions in original and dual models, we formulate the process of duality discovery as an optimization problem. We numerically solve this problem and show that our framework can redis- cover the celebrated Kramers-Wannier duality for the 2d Ising model, numerically reconstructing the known mapping of temperatures. We further investigate the 2d Ising model deformed by pla- quette coupling and find families of "approximate duals". We discuss future directions and prospects for discovering new dualities within this frame-
-H(,,,) --H,00, However, in nature we often have access to sets expectation values of observables (a(a) (some real-valued functions of the microstates, e.g. correlation functions, with a being an arbitrary label)
(Oa(o)) = [c((o)ex((-H((..)) (I)
It is profound physical fact that occasionally there are alter- native representations of these sets of correlation functions (see e.g. (Savit, 1980; Kramers & Wannier, 1941b;a Peskin, 1978; Dasgupta & Halperin, 1981; Coleman, 1975; Wegner, 1971) for influential examples). That is, there exists another set of microstates ã, another Hamiltonian [3, ā] and for each observable O₂(a) dual observable O₂ (ōx) such that
(Oa(a)) -
(2)
When this happens, we have a duality -the same physical system has at least two distinct mathematical descriptions, which may be useful for different reasons.
work.
A prototypical example of such duality is Kramers- Wannier duality for the 2d Ising model (Kramers & Wannier, 1941b). The 2d Ising model consists of spins o; =1 liv- ing the sites of square lattice at temperature 8-1, with Hamiltonian that sums over neighbouring spins (ij)
1. Background
A key concept in physics is duality, i.e. the idea that the same physical system can have two different mathematical descriptions. Duality sits at the heart of modern theoretical physics. In this work we seek to formalize the notion of duality in statistical physics in manner that allows modern machine learning techniques be used to systematically search for dualities.
[[8,o]=-
Σ J
(83)
It is a remarkable fact that the model described by (3) is precisely equivalent to a different 2d Ising model model with spins ã; +1 living on the dual lattice, with a dual Hamiltonian of the same functional form
"qqual contribution Max Planck Institute for Human Develop- ment, Berlin, Germany DDutschees Elektronen- Synchrotrnnno DESY, Germany 'School of Mathematics, The University of Edinburgh *Department of Mathematical Sciences, Durham University, UK "Amsterdam Machine Learning Laboratory, University of Ams- terdam, Netherlands. Correspondence to: Prateek Gupta <con- @ Seu.t@ppua..i......
| -3
3 Σo (15)
(4)
Proceedings of the 4nnd International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).
but with 3 satisfying
sinh 1
(5)
Our implementation is publicly available at http://gihtahcoomnn245//hhhsss duality
"See e.g. (Kardar, 2007) for a textbook treatment.

---

A Machine Learning Approach to Duality in Statistical Physics
where the second sum is sum over plaquettes (squares)
(tjkl), has not yet been performed.
In this work we tackle the problem of finding statistical physics dualities using machine learning. In particular, start- ing from an original model (H, Q) determined by a Hamil- tonian H and selected observables O, we formulate an op- timization problem whose solution can recover both this model as well as dual descriptions (H, O). As a first step. we will focus on the 2d Ising model with Hamiltonian (3) and observable Oij j. as well as on the plaquette model (7). We demonstrate that the optimization problem recovers the known dual to the 2d Ising model, thus offer- ing an automated discovery of a duality. We furthermore give evidence for the absence of certain self-dualities of the plaquette model. As we shall see, also this negative result highlights interesting physical features.
Figure 1. The two-point product of spins in the original frame a:ay is related to the product of spins 7 ozz in the dual frame, where ;", are related to ij as shown.
Note that this maps low temperatures to high temperatures. The fact that the functional form of the Hamiltonian is the same is exceptional, and in this case one can call the duality a self-duality.
Previous work: The problem of learning the parameters in a Hamiltonian from data is precisely that of training Boltzmann machine, and has very long history. Our case differs from the classical situation in that we are simultane- ously learning a mapping of observables.
Importantly, all observables constructed from the or can be mapped to observables of the o,. Consider for instance two neighbouring spins and j.. We can build an observable Og = 0,0,, which we call a link product. Then the KW duality implies that
Other work on using machine learning to probe dualities in statistical physics includes (Betzler & Krippendorf, 2020). Section of that work has some overlap with ours, where the key differences are: (1) in that work the input into the du- ality mapping is spin configurations sampled in the original frame, after which second step of sampling is done: this is not exactly the usual setup for duality in physics, where one usually just samples once (importantly, in a dual frame) and then performs a deterministic mapping, as in our work. (2) It seems that the loss function used in that work cannot be formulated unless the duality mapping of temperatures is known already, and thus that this work cannot be used to find new dualities, which our formalism allows.
(0.---)H (0
Ōiy(ō)= = E
(6) where the notation oie refers to sites on the dual lattice such that the link connecting sites i" and j* intersects the link connecting i and j. as shown in Figure 1. The indicate that this is an operator equation which holds for arbitrary insertions of operators and thus can be used to construct any expectation value of an even number of the o; Appropriate products of the link products determine all correlation functions.
Deformations of this prototypical duality have explicitly been studied in some special cases (Strycharski & Koza, 2013; Cobanera et al., 2011; Aasen et al., 2016). However, even in this controlled setup a lot remains to be understood and a fully systematic approach is not available. For in- stance, to our knowledge an explicit study of dual models to the plaquette model
We also note work in the context of duality in quantum field theory (Bao et al., 2020).
2. Methodology
We now explain how, starting from the Hamiltonian H|3, []] of some statistical model on lattice, we can learn candi- dates H [3, ō] for dual models as well as a dictionary be- tween original and dual observables. This includes learning the fact that the dual model is defined on a different lattice, such as the dual lattice.
H[3,0] = Σ Oo0;-- - K Σ C.joooor (3)
(i)k))
'Due to Z2 symmetry the expectation value of moment of odd number of spins formally vanishes in finite model, though as usual the symmetry spontancously broken phase this might not be observed in simulation that uses local updates. We also note that the relation is modified if we consider precisely the same two-spin operator twice, i.e. (a, = 1, when careful derivation of the duality shows that the hight-hand side must be modified and also identically 1.
Framework and loss function: We assume that H can be written in terms of local couplings of spins:
[[ = - > ā5ā
(8)
(33)
(2)k()
2

---

A Machine Learning Approach to Duality in Statistical Physics
[ : L
Rotate 90º Reflect Vertically
Figure 3. Examples of three features showing link products con- sidered.
2
3
2
O
3
5
1
6
4
Instead we explicitly match features - i.c. moments of a small number of nearby link products, as shown in Figure which we then spatially average over the lattice. Denoting these features as & with a running features, we then construct the loss
0
5
Figure 2. We parametrize G' as neural network that takes neigh- boring links of a given link (in this case 6) as its input. The assignment on horizontal links is related to that on vertical ones by a rotation and reflection.
L(G. H) = Eee e
e" ="=
(0"(o,))
(10)
e" can be thought of as a vector in feature space indicating how far apart the two theories are.
where the couplings (3, it etc.) ) are parameters to be learned. We would like to find dual representations of the link prod- ucts Oi we described for the Ising model. We assume that the link product in the original model is mapped to some functions of nearby link products in the dual model, more precisely
For the 2d Ising model, is clear that this loss can be mini- mized in scenarios: (a) H = H and G(ōzūz) 0z0 i.e., the original model is rediscovered, or (b) H + H and G(ōāūū)) + ō,ē representing a nontrivial dual model where (selected) moments nevertheless perfectly match those of the original model. The plaquette model has no dual that is known explicitly.
(σ) G((ōrrr))
where { is set of link products such as the one shown in Figure 2.
Optimization:
We now need to solve the following opti- mization problem:
G is designed to be sufficiently flexible to recover models on lattices related in various ways to the original one. Note that a choice must made about how relate the assign- ment of link products neighbouring horizontal link to the assignment of link products neighbouring a vertical link, multiple choices are consistent with rotational invariance. In Figure 2 we display the choice used, which relates them by rotation composed with a reflection. As we will see later, this choice is important for recovering the geometry of the dual lattice
G G arg min L(G, iI)
min
(11)
G
G represented by a neural network with parameters G G
Algorithm outlines the procedure for optimization. Given trial set of parameters 0 and couplings for the dual Hamil- tonian 3., we simultaneously perform Markov Chain Monte Carlo (MCMC) sampling from the original and dual Hamil- tonians using a standard Metropolis algorithm to obtaín spin configurations a; and ō; drawn from the appropriate distri- butions respectively. We can then evaluate the expectation values in (10), and compute the loss L.
We now construct loss function L that is minimized when all correlation functions of Oij and Ö. agree the two sides of the duality. This is similar to the matching of mo- ments of two distributions, which is standard problem, and for which one can construct general kernels that are minimized only when all of the moments of two distribu- tions agree (see e.g. (Li al., 2015)). Unfortunately, in the present case we cannot use kernels because of one concep- tual and one technical problem: 1) certain moments need not be matched, as per Footnote 2, and 2) notion of locality is embedded in standard moment matching. In the present case, correlation functions of faraway spins carry little in- formation, and thus attempting to match their moments is a waste of computation.
To minimize it we also need to compute gradients 0g L and 0g C. For 0 this can be done straightforwardly using con- ventional automatic differentiation techniques. For the &a we cannot backpropagate through a stochastic sampler, but explicit differentiation shows that we can relate the gradients to expectation values that can be evaluated through MCMC sampling from the dual Hamiltonian. For concreteness we demonstrate the argument with only a single nonzero cou- pling 9 in (8), but the generalization to other couplings (and in particular the plaquette coupling k) is immediate, For any
3

---

A Machine Learning Approach to Duality in Statistical Physics
function of spins [[ā] we have
Improving convergence through variance reduction in gradient estimation. Theoretically, computing gradients as described above should be sufficient. In practice, we observe significant noise, which hinders the optimization process. Computing gradients using MCMC inherently has high variance, making the optimization procedure highly sensitive to inefficient sampling. We find this problem be especially severe in the case of two or more couplings.
( (
Σ {ō:}
[oloee(8ssn 010,)
(12)
where -(3) = EG.)) e Cas 020,) and the sum over {o,} runs over all spin configurations. Now we have
0zC = 2
e" 1 (G():))
(13)
To address this, we leverage the fact that in our training procedure, the target system remains unchanged across steps. This allows us to aggregate the target feature vec- tor over multiple steps, thereby stabilizing it over time. Let t" = (a)( и denote the running expectation of the tar- get feature after sufficient number of steps, such that its variance is minimized. The difference in feature vectors can be written as
where we have used the definition of er in (10). From (12) the gradient of any observable with respect to 3
(0) A = ( A Σ قق + (60,0,0) (14)
(5))
where the first term comes from differentiating ( and the second from differentiating inside the Boltzmann measure weighting each configuration (12). Using this expression to evaluate (14) for O o= [G(ā;)] we find:
= (G t
(16)
For the second issue, we mitigate the variance in MCMC- based gradient estimation using control variates, common variance reduction technique. Practical constraints limit our frability to obtain sufficiently large samples that accurately reflect the underlying distribution. To counter this, we in- troduce a constant baseline as a control variate (Mohamed et al., 2020; Greensmith al., 2004). Since the target sta- bilizes over time, our baseline includes the target feature itself, effectively reducing variance in the gradient estima- tion process. Thus, gradients are estimated as follows:
0zC - Ee
(
Σ ov Σōrā (15)
('(Ga(o))
(8
(15)
We can now evaluate the expectation value by MCMC sam- pling from the dual Hamiltonian. We note that this evalu- ation is computationally expensive, as each gradient step requires us to equilibrate an MCMC chain. For training conventional Boltzmann machines one can use more effi- cient approaches such contrastive divergence (Carreira- Perpinan & Hinton, 2005). Due to the presence of the map- ping G, we are not aware of similarly efficient algorithm in our case, and indeed all likelihood- -ased approaches seem conceptually difficult.
- 2..'
(
(E (o:ā5)
(6))
(39)
Algorithm Machine learning for finding statistical me- chanical duality
(G(o) -
(17)
Note that the extra term here relative (14) is that in 1"; as usual for such baselines, it is proportional 0g log and thus vanishes in expectation, but reduces the variance.
Inputs: 8. 17 (learning rate), N (number of samples)
2: Initialize: A R, 0 E Rd
3: for each epoch (. = 1, 1, .., T do
4: Draw N samples {a ~ (()
N.
NN ~ p(ō(3) where 3 4 B 5: Draw N samples [
3. Experiments
6: Compute the loss L = N Σ i= L(o,, Go(ā.))
In this section, we describe some simple experiments using the above machinery.
7: Compute the gradients 0zf and d.L
8: Update the parameters:
But1 + B n2
Neural Network architecture for G: For given link product in the dual frame we assemble the nearby links shown in Fig. 2 into a 7-dimensional vector f(g (Zz)?, where each element of the vector is the product of the two spins living on the two ends of the link. We consider a simplistic neural network acting on this input, with parame- ters formed by 0 E R?, and scalars 0g and 0g. We opt for hard attention using Soothel-Sotmax (Jang et al., 2016) so
0.+1 t 0, - 1
9:
if C has not improved for the last X epochs then
10: Stop the optimization
11: end if
12:
end for
4

---

A Machine Learning Approach to Duality in Statistical Physics
that only few of the seven nearby links are utilized in the prediction task. Thus, the mapping is defined by,
2
Go (f(ss)) = 82 Gumbel-Softmax((4 (()) + 03 (18)
2
As the elements of (az) are =1, very simple network provides very expressive function. In experiments, we initialize 0g and 0g from a uniform distribution, 1)), and 01 from normal distribution, NO, 1).
6
6 2
6
3.1. Original 2d Ising model
We take our original Hamiltonian H to be that of the 2d
Ising model (3), and we take the dual Hamiltonian H in (8) to have only one non-zero parameter 3 (and so k = 0, etc.).
Figure 5. Emergence of dual lattice: c.g. if four original links (marked by 6) form a square, the corresponding four links that are referenced by the neighbour mapping (marked by 2) Figure 2 form a cross, as expected for the dual lattice.
Theery thued Theory (fensmappeei Optnn cster raud.
0.8
smnzztomeezit 1
0.6
Interestingly, we find that the method does not perform re- liably as we approach the phase transition , = 3e R 0.44, where the dual and original branches coincide. In addition, we find that does not work equally well for 3 > 9., when the original frame is in the symmetry-brokee phase. We show the same plot for this phase in Supplementary Ma- terial. This is somewhat reminiscent of known difficulties in learning parameters of Hamiltonians at high 3 (see e.g. Appendix B of (Haah et al., 2024)) and deserves further study.
0.0
022
-04
0.179
0.2
0.229
4.5
0.23
0.3
0.329
0.35
0.37
04
0,25
Figure 4. Final B as found by the deep learning framework closely matches that of the theoretical results. Points are scaled by the negative logarithm of the best loss such that the size of the points inversely proportional the loss. We cap the minimum size so that smaller points visible. The loss is minimum along two fronts, i.c, original frame 3 = = and the dual frame along the lines (28) s2nh 1.
Further details on the experiments (including an exploration on how they depend on the system size) are shown in the Supplementary Material.
It is interesting to ask how the model recovers the structure of the dual lattice, as well as the dual observables. The attention mechanism used encourages the model to use only a single link of the input, and for the runs that find the dual temperature this ends up using the links numbered either 2 or 5 instead of the original 6 in Figure 2. As we show in an example in Figure 5, this is equivalent to finding the dual lattice from the original. Note that here it is important that we relate horizontal to vertical links by the composition of a rotation and reflection as shown in Figure 2; other choices will not result in the possibility of finding the dual lattice, and indeed in our experiments they do not find duality. The optimized values of Gg closely match theoretical results Özg (ō) = e -2šö.. as shown in more details through the sampled training trajectories in the Supplementary Material.
Rediscovery of the 2d Ising duality. In Figure 4, we show the result of deploying the above machinery on different model values of (i on an 8 8 lattice with periodic boundary conditions. For each value of the input B, we ran total of 10 optimizations, five from each of the two initializations of 9, i.e., 3o = 0.2 and 3o 0.5. Due to the randomness involved in MCMC sampling, each seed is expected to be an independent run.
We record the value of 3 obtained. There are three branches of solutions: the original model 3 3. the dual model sinh((.)) s2nh = 1, and an antiferromagnetic analogue of the original model 3 3B. The latter is equivalent to the original frame, and is obtained by making the change of variables - -a, on every other site, thus flipping the sign of B > B. Note that the existence of the dual branch of solutions can be viewed as a numerical "rediscovery" of the KW duality line
In this approach, the one-to-one mapping of / to 9 is only found numerically; one could possibly supplement this nu- merical determination with symbolic regression (Schmidt & Lipson, 2009) to obtain an analytic formula such as (19), but in more complicated examples of the duality we do not expect there to necessarily exist a simple analytic formula and thus have not explored this.
sinh(2 sinh (2,3)
(19)
5

---

A Machine Learning Approach to Duality in Statistical Physics
0.4
0.2
0.0
-0.2
Marker Legend
Target B with
Theoretical dual of target & with
-0.4
Target (B, x) with *
Optimization result
0.4
-0.2
0.0
0.2
0.4
0.6
0.8
1.0
B
Figure 6. We display the both the target couplings (,,, K) and the output couplings (8, R) from the optimization procedurc. We also indicate theoretical duals to models with (3 * 0, x. = 0). Note that duals to models with x & 0 are not known. Similar to Figure 4, the size of the points is inversely proportional to the loss. The optimization often finds the original frame (8, (or its antiferromagnetic image (-3, x)). When the target x = 0, duals are still recovered, though accompanied by clusters along the lines B + const, the reason for which discuss in Section 3.2.
3.2. Plaquette 2d Ising model
periments, corresponding to 20 runs for each combination of (3, R.) in the set (0.15, 0.2, 0.25, 0.3, 0.35) x (0.0, 0.1, 0.2}. Here we see that the output from the optimization often recovers the original frame (3, x) (or, as above, its antifer- romagnetic image (-B,x)) However we do not find any dual theories when K * 0.
We now turn to slight generalization of the familiar Ising model by adding an extra 4-spin coupling:
H HB, KG; 0.)
Σ o,o (19)
Σ OHOORo
(20)
(iykd)
where in the second term we take the product of four spins around an elementary square plaquette. This "2d Ising pla- quette model" is no longer exactly solvable and has been pre- viously studied
This is somewhat expected. Recall that away from the con- ventional 2d Ising model, one does not necessarily expect the dual Hamiltonian to take precisely the same functional form - i.c. have exactly the same nonzero couplings as the original. Thus, our analysis gives evidence against such hypothetical fortuitous scenario. A more systematic approach would require to turn larger number of couplings (e.g. could imagine allowing for all couplings that couple spins in neighbourhood of given size).
nontrivial testbed for MI approaches to statistical physics problems (see e.g. (Huang & Wang, 2017; Wang, 2017)). This model again has disordered phase at small (8, k) and an ordered phase at larger couplings. For completeness we present a simple mean-fin field description of the phase diagram in Appendix A. As mentioned in the introduction, no precise Kramers- Wannier duality for this exact model is known for finite
We should still however ask whether now that model is allowed to vary we can still find the standard expected KW duals to theories with the targer λ 0, which are shown circles in Figure 6. Though clusters of theories along lines of the form + A const emerging from the known duals. To understand the physics behind this surprising fact, note that this happens when the dual model deep in the ordered phase. Consider now a typical configuration of spins this phase. To good approx-
We discuss the results from applying the machinery above to search for duality with the same functional form, i.e.
find these, also find
H H R; 0.] = - ã. R Σ ōză
(21)
(i)kt)
The results are shown in Figure We ran total of 300
6

---

A Machine Learning Approach to Duality in Statistical Physics
imation, the spins will all be pointing in the same direction, Le. may imagine o; 1 for almost all with occasional very rare spin flips to o; -1. From the Hamiltonian (21) we can compute that the energy cost to flip spin against this background is 8(3 A), so the probability to flip the spin (as
Marker Shape
dirend by our (romooord)
Mean Connestoon
220
IB KumDr onggial frams
035
compared to keeping it constant) behaves p e 8(8+8) This single spin flip probability which depends only on the combination B + R will determine essentially all of the observables, as the chance of flipping two nearby spins is itself even smaller. Thus we see that almost all observables depend only on 3 + R, and the optimization algorithm finds difficult distinguish points along this line.
230
0.00
0.0
Figure 7. The moments formed from the product of consecutive links forming linear chain in lattice of size 24 24 match across approximate duals found from the framework across So {0.2, 0.25, 0.3} and their corresponding theoretical duals. We cover extensive comparisons on other types of moments in the supplementary material.
This "approximate duality" is not specific to this model and will essentially happen any time we are dealing with a dual frame which is deep in an ordered phase. It reflects the fact that all systems which can be described by a dilute gas approximation (i.e. described by a density of dilute objects such as rare flipped spins) have kind of universality in that all observables determined by single parameter: the probability of the rare event, in our case e c-((++)), In this sense matching this parameter alone will result in "dual" description. To localize the system along the line we need increase the precision of observables that they be sensitive to even lower probability events involving the interaction of multiple rare events. In practice this will likely require more sample-efficient optimization techniques.
given threshold e. Ideally, we aim to maximize the area under this curve.
We conduct 10 experiments for each combination of (3, k) in the set {0.25) x {0.0, 0.1). evaluating both conditions: with and without variance reduction. The dominance of blue lines (with variance reduction) over orange lines (no variance reduction) highlights that methods without variance reduction techniques exhibit poor convergence.
100
Experiments
reduction Without variance reduction
Empirical support for approximate duality. We now
show that a broad set of moments - including correlation length- accurately matched across approximate duals. To do so in a completely generalizable fashion, (a) we evaluate moments that were not included in the training loss, (b) we compute these moments 24 24 lattices, beyond the training regime, (c) we include approximate duals along the hypothesized line for comparison. Due to computational constraints, training directly on large lattices like 24 x infeasible. Instead, we apply learned mappings G9 from 8 x 8 lattices estimate features on larger systems without retraining.
Target (8. K)
% of Optimization results with iith
K)=10.25, 0.01
(B. k)-(0.25,
Figure shows that the average moments across all approx- imate duals for 90 E {0.2, 0.250,200000 0.3) exactly match that of the theoretical dual frames. Due to the lack of space, we provide an extensive comparison in the supplementary material.
10
10-2
10a
201
Threshold (c)
Figure 8. Here we henchmark the control variate technique that we use, determining how many of our runs recover known target theory within given tolerance As the tolerance is relaxed more and more runs are counted; the area under this curve is a measure of the success of the algorithm. We clear increase in efficiency from using the variance reduction technique.
Impact of variance reduction on convergence. We com- pare our proposed algorithm, which incorporates variance reduction techniques for gradient estimation in (17), with the theoretically derived gradients from (15) in this section.
Interpreting model learning behavior. Figure 10 pro- vides visual representation of mappings learned by the models for o,o, = +1, in the optimization results obtained from Figure 6. Notably, the majority of runs converge to
To quantify deviations, we define the A as the maximum absolute deviation in 3, Ge(+1), Gø(-1), K. Figure presents the number of experiments where A remains below

---

A Machine Learning Approach to Duality in Statistical Physics
200
Target
68%
Target
Attention entropy (log scale)
175
-1
-2
Count
125
-3
100
-4
-5
75
-6
Selected Dimension
50
-7
{0. 1, 4)
25
{2. 5, 6}
1
5 6
-6
-5
33
Selected Dimension
Loss (log scale)
Figure 9. Left. The attention mechanism generally picks a single link to determine the observable. In the labeling of Figure 2, we display the links chosen the endpoint of the for cases where 0 and where * 0. Note that when 0 generally link 6 obtained (which indicates the rediscovery of the original theory), and when x & O there is reasonable chance to find links 2 or 5, indicating a mapping the dual lattice and Kramers-Wannier duality, explained around Figure 5. Right, demonstrate that where links (2, 5, 6) are chosen generally have much lower loss and attention entropy.
the expected mappings, either learning the original mapping in the ferromagnetic phase with (o(z) = x or in the anti- ferromagnetic phase with G4(x) = =z. The results that align with "approximate duality" exhibit mapping values close to those expected under perfect duality when x = O. This visualization gives a close look into what models are actually learning at internal level.
Marker Types
Target mapping
Theorctical dual mapping
Optimization
Pemomagnetic
0.5
target mapping
To further investigate which mappings the models predomi- nantly learned, we examine the frequency of selected links in the left panel of Figure 9. As discussed earlier, only links numbered 2 and 5 correspond to the correct dual mapping, while link 6 represents the original link. Our optimization results predominantly select links jority favoring the original link, particularly in cases where * O. On the right panel of Figure 9, we plot, as a func- tion of the loss, the entropy of link selection computed El Ou * log fu. where / corresponds to the links. Inter- estingly, as indicated by the spatial clustering of blue and orange dots, optimization results with lower uncertainty link selection (i.e., lower entropy) exhibit a higher proba- bility selecting the correct link. These optimization runs also achieve lower loss values, reaching low 1e 7. Thus, high entropy in link selection is associated with suboptimal optimization outcomes.
Go(+1)
0.0
6, with the ma-
8 0.35
8 0.25
Antiterromaneetc sarget mapping
0 0.20
Gol-1)
Figure 10. We display the mapping functions found by the algo- rithm, plotting Go(+1) against G-(-1) and indicating the trivial ferromagnetic solution (where Go(x) = x), the antiferromagnetic solution (where Gz(z) -x) and the non-trivial duality (where Ga(z) runs.
The FM and AFM clusters contain many
4. Conclusions
Above we have explained how the process of finding dual- ities can automated, demonstrating the mechanism by "rediscovering" the well-known Kramers- Wannier duality of
8

---

A Machine Learning Approach to Duality in Statistical Physics
the 2d Ising model, and by testing our system on the more general plaquette model. This is only a proof of principle, and much work remains to be done.
354001.
Bao, J., Franco, S., He, Y.-H., Hirst, E., Musiker, G., and Xiao, Y. Quiver Mutations, Seiberg Duality and Machine Learning. Phys. Rev. D. 102(8):086013, 2020. doi: 10.
For example, as discussed in Section 2, at present we match a number of features which are constructed by hand. It would be ideal to find kernel that allows matching of all the required moments while simultaneously giving lower weight to those involving faraway spins. On the operational side, it would be helpful have more efficient way of training: contrastive divergence fails here there appears to be no simple way to map the likelihood of single spin configuration across the duality.
1103PPhySReDD.002.0600)0
Betzler, P. and Krippendorf, S. Connecting Dualities and Machine Learning. Fortsch. Phys., 68(5):0000222, 2020. doi: 10. 00.1002/prop.222000022 202000022.
Carreira-Perpian,, M. A. and Hinton, G. On contrastive di- vergence learning. In International workshop on artificial intelligence and statistics, pp. 33-40. PMLR, 2005.
On the physics side, we hope to use such techniques to find new dualities or to understand approximate dualities. One direction that we have initiated above is to search for Kramers- Wannier duals of deformed Ising models, where extra spin-spin couplings such as the plaquette term above have been added to the action. While some results exist for specific models (Strycharski Koza, 2013; Cobanera et al., 2011; Aasen et al., 2016), we are not aware of a completely general approach that provides very explicit results. Our experiments show that adding more couplings generically increases the difficulty, highlighting the need for more sample-efficient techniques. Finally, less concrete but far more exciting direction would be if one could use the approach to find entirely new dualities, unconnected to any existing ones. We hope to return to this in the future.
Cobanera, E., Ortiz, G., and Nussinov, Z. The Bond- Algebraic Approach to Dualities, Adv. Phys., 60:679-798, 2011. doi: 10. (000000001833..011..11
Coleman, S. R. The Quantum Sine-Gordon Equation the Massive Thirring Model. Phys. Rev. D. 11:2088, 1975. doi: 10. 1 103/PhysRevD... 11.2088.
Dasgupta, C. and Halperin, B. Phase transition in a lattice model of superconductivity Physical Review Letters, 47 (21):1556, 1981.
Greensmith, E., Bartlett, P. L., and Baxter, J. Vari- ance reduction techniques for gradient estimates in reinforcement learning. Journal of Machine Learning Research, 5:1471-1530, 2004. URL http:/ hwwp://wwmlrr................ http::/www.jmml..rggg... wttpw/wwwww..../pppperree.eeetet vomeee/// preensmittOlla/grreenntttt
Acknowledgments
pdf.
We are very grateful to Roberto Bondesan, Arkya Chater- jee, Tarun Grover, Tyler Helmuth, Theo Jacobson, John McGreevy, Takuo Matsubara, Salvatore Pace and Tin Sulej- manpasic for helpful discussions. We thank the anonymous referees for their useful feedback. This work was supported by grant from the Simons Foundation (PD-Pivot Fellow- 00004147 147, NI). NI supported in part by the STFC under grant number ST/T000708/1. AEVF was in part supported by the EPSRC Grant EP/W020939/1 "3d N=4 TQFTs". This work has made use of the Hamilton HPC Service of Durham University.
Haah, J., Kothari, R., and Tang, E. Learning quantum Hamiltonians from high-temperature Gibbs states and real-time evolutions. Nature Phys., 20(6):1077-1031, 2024. doi: 10.10088/41577--0--23777.x.
Huang. L. and Wang, L. Accelerated monte carlo simu- lations with restricted boltzmann machines. Phys. Rev. B, 95:035105, Jan 2017. doi: 10.1103/hyyRewB.B55 035105. URL https: htt///innk.a... aps wwwpsoorg//oolli/ 1103/Phys 1003/PhysReBB.. ......55.333 035105.
Jang, E., Gu, S., and Poole, B. Categorical repa- rameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144. 2016.
Impact Statement
Our work holds significant potential to advance knowledge in statistical physics. At this stage, we do not anticipate any negative societal impacts.
Kardar, M. Statistical physics fields. Cambridge Univer-
sity Press, 2007.
Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.69800 2014.
References
Aasen, D., Mong, R. S. K., and Fendley, P. Topological Defects on the Lattice I: The Ising model. J. Phys. A, 49(35))354001, 2016. doi: 10.0088//7511881134455//
Kramers, H. A. and Wannier, G. H. Statistics of the Two- Dimensional Ferromagnet. Part II. Phys. Rev., 60:263- 276, 1941a. doi: 10.1 103/PhysRev.60.26..
9

---

A Machine Learning Approach to Duality in Statistical Physics
Kramers, H. A. and Wannier, G. H. Statistics of the two-dimensional ferromagnet. part i. Phys. Rev. 60:252-262, Aug 1941b. doi: 10.1103/PhysRev. 60.252. URL https://////... wiink.aps........ ott.aapg/o.oo///00//////// 1103/PhysRev. 2t..me...6..2... 60.252.
Li, Y., Swersky, K., and Zemel, R. Generative moment matching networks. In International conference on ma- chine learning, pp. 1718-1727. PMLR, 2015.
Mohamed, S., Rosca, M., Figurnov, M., and Mnih, A. Monte carlo gradient estimation in machine learning- Journal of Machine Learning Research, 21:1-63, 2020. URL http: jmlr. httpg/paprs////111/// html.
Paszke, A., Gross, S., Chintala, S., Chanan, G., Yang, E., DeVito, Z., Lin, Z., Desmaison, A., Antiga, L., and Lerer, A. Automatic differentiation in pytorch. 2017.
Peskin, M. E. Mandelstam 't Hooft Duality in Abelian Lattice Models. Annals Phys., 113:122, 1978. doi: 10.
101600033-49167779905522
Savit, R. Duality in Field Theory and Statistical Sys- tems. Rev. Mod. Phys., 52:453, 1980. doi: 10.1103/
RewModPhys.52.453.
Schmidt, M. and Lipson, H. Distilling free-form natural laws from experimental data. science, 824 2009.
Strycharski, A. and Koza, Z. The dual model for an ising model with nearest and next-nearest neighbors. Journal of Physics A: Mathematical and Theoretical, 46(29):295003, 2013.
Wang, L. Exploring cluster monte carlo updates with boltzmann machines. Phys. Rev. E, 96:
051301, Nov 2017. doi: 10.11033PhysRew..966 051301. URL htttttttp:/mmmm http//inikk.........e.e..
aps. ppss.rr//do//1// 1103/PhysRevE. 96. 051301
Wegner, F. J. Duality in generalized ising models and phase transitions without local order parameters. Journal of Mathematical Physics, 12510)2259-2272. 1971. doi: http://i..ooo.ogg/oo00o55...666
URL http://esiteiionnaaa.ooo//oorrrr
10

---

A Machine Learning Approach to Duality in Statistical Physics
A. Mean-field discussion of plaquette model
Here we establish some basic features of the plaquette model defined by
3 kc 0. = - 3 Σ 0,0 (Ag)
K Σ O100O00
(22)
(6)k))
There is no known exact solution to this model for all 8, k. On general grounds we expect a disordered phase at small (3, k) and an ordered phase for larger (3,x), x). We present a simple mean-field discussion of the Hamiltonian to confirm this expectation, noting that while we expect gross features of the phase diagram survive, it is not expected to be quantitatively correct in 2.
Denote the true probability distribution for this model by
(o,) 1 ((3,k)
(x,(-H[B,R; k2;
(23)
As usual we perform mean-field treatment by postulating a simpler distribution go(a;) labeled by some variational parameters & and minimize the KL divergence between the true distribution and the variational one:
go(or) ) = [H[8, 12; ov] + log 2o (o))))) + const (
D DEL (1ol (p3,<) = log
(24)
The constant contains the intractable partition function ( k), but it is independent of the variational parameters and so can be neglected. In physics this is precisely the minimzation of the free energy E - TS, where our choice of where to place the factors of / means that factors of appear slightly differently. We now pick a trial do which is factorized on the sites, i.e.
golo = II exp(()o;;
(25)
2 cosh(
where our variational parameter é; on each site can be thought of loosely as a classical coarse- -aasieer field. This is the most general factorized distribution for a binary variable.
Computing the KL divergence for the choice where o, = Φ is constant on all sites we find
DKL L (gollgg.. (p...) = 2, tanh² d- tanh á ø tanh e - log(2 cosh()))
(26)
This function always has a stationary point at á = 0 due to the Z, symmetry 6 + - Exploration of the minima indeed shows that this stationary point is minimum of the free energy for small (3, k) but is no longer a minimum at large (3, x). The existence of minimum of the free energy at a nonzero value of o indicates an ordered phase with spontaneous breaking of the Z2 symmetry.
We focus on the limiting cases: at = 0 there is second order transition at 3 (this is the standard result for the mean-fiell foeld treatment of the 2d Ising model), and at 8 = 0 there is a first-order transition at k zo 0.688, where the precise value was found numerically through balancing the free energy at the trivial and nontrivial minima of (26). Numerical exploration shows that the phase transition line connects these two points straightforwardly.
We include this discussion for completeness, noting that the quantitative features are unlikely to survive (e.g. note the well-appreciated fact that even at к 0 the true value for the transition at 3 0.44 differs significantly from the mean-field estimate FAF 0.25). For that reason we have not found the precise location of the change from second-order to first-order, as it is unlikely to be accurate for the real model. However the topology of the phase diagram is likely to have the shape shown, as is borne out by our numerical experiments.
B. Neural network training
Our models are all implemented in PyTorch (Paszke et al., 2017). We used the Adam (Kingma & Ba, 2014) optimizer with the learning rate of 0.01. Moreover, used the early stopping criterion stop the training if the loss didn't 't improve over 200 epochs. We ran the sampler in each experiment to generate 1000 samples for the lattice. We ran the training for a maximum of 25000 epochs, and our runs took about 1-3 hours each. The experiments in the main paper are run on the lattice size of 8 x 8.

---

A Machine Learning Approach to Duality in Statistical Physics
C. Typical training curves
We provide some further details on our experimental results. The plots below are representative and were obtained with the control variate technique.
Figure 11 shows rums for 3 = 0.25 grouped by 9o and frame discovered by the runs, illustrating how the training progresses under different scenarios. For the seeds where either the dual original frame is recovered, the loss goes to O. Further, we track the entropy of Gumbel-Softmax (01) to assess how the algorithm is weighing each feature. A value of corresponds to a strong preference for one out of the seven input links.
A
1.2
0.6
1.0
0.8
gangnal
0.6
0.2
0.0
1000
1500
2500
3000
3500
4000
500
1000
1500
2000
2500
3000
3500
4000
D
3
Mapping of observable
(-11
Gdnd
Attn Entropy
Gongina(-1)
(o)g (+1)
1
500
1000
1500
2000
2500
3000
3500
4000
500
1000
1500
2000
2500
3000
3500
4000
As
original
0.6, Recovered
Ps
original
Figure 11. Training progress for runs from | = 0.25, grouped by 9o and the final frame discovered to showcase the trajectory of various metrics. We show exponentially smoothed moving average the following metrics: (A) Loss, (B) (C) Mapping observables, (D) Entropy of Gumbel-Sone Soathel-Sotmaxxee For (B) and (C) we denote theorctically expected values in original and dual frames by the dashed lines. Note that these runs are recovering original 2d-Ising model.
D. Scaling to bigger lattices
Figure 12 shows the fraction instances in which either 8. B, or 88 were successfully recovered. We observe that the convergence rate improves as the lattice size increases to 10 10, 12 12, and 14 14.
12

---

A Machine Learning Approach to Duality in Statistical Physics
Lattice size
N=8
N-10
N=12
N=14
% Optimization results with A s
80
60
40
20
10-3
10a
10P
10:
Threshold (e)
Figure 12. Fraction of optimization results with a maximum deviation, A less than threshold, for optimization runs on & = 0.25. We observe that increasing N beyond eight results in only marginal improvement performance.
E. Post-phase transition performance
Figure 13 shows a plot similar to Figure but for the phase transition phase, 3 > Bo. We observe that the method does not work as well as with the lower 3s.
0.8
0.6
B
0.4
0.2
sinh(28)sinh(2$$1
0.0
0.2
-0.4
Theory (Dual)
Theory (Antiferromagnetic)
-066
Theory (Ferromagnetic)
Optimization result
0.475
0.525
0.55
0.575
0.6
0.625
0.65
0.675
0.7
B
Figure 13, Optimization results for post-phase transition don't work as well as before the phase transition.
13

---

A Machine Learning Approach to Duality in Statistical Physics
F. Empirical support for approximate duals
now provide evidence to show that a broad set of moments--includnng correlation length-is accurately matched across approximate duals. This close agreement suggests that the essential physics is preserved: as discussed in the main we believe this largely follows from the fact that the single-spin-Iie -lip probability determines much of the physics in this regime,
To assess generalization, we compare feature statistics between approximate duals (both found from our experiments in the paper and from the hypothesised line 3 + const) and the corresponding theoretical duals. Importantly,
We evaluate various features not included in the training loss
We compute these features on larger lattices of size 24 x 24, beyond the training regime
We include approximate duals along the hypothesised line for comparison
Due to computational constraints, training directly on large lattices like 24 24 is infeasible. Instead, we apply the learned mappings from 8 & lattices to estimate features on larger systems without retraining.
In all the plots, the top panel shows average feature values across all approximate duals for 30 {0.2, 0.25, 0.3) - the original-frame 3 values that yielded these approximate duals, and the lower panels show individual approximate duals (marked by x). Squares mark the features corresponding to theoretical dual configurations.
We consider three categories of features. For each category, we present two plots: (Framework) one based on approximate duals found by our framework, and (Hypothesized) another based on duals inferred from the hypothesized line ++x const, where the constant is chosen to intersect the known dual point 3
Product of consecutive links in linear chain in a lattice of size 24x24: There are 24 such features (not used in the training loss). Figure 14 & 15 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. Both sets of approximate duals closely match theoretical expectations
13 features constructed from link products used the training loss: Figure 16 17 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. These features match well across both sets of approximate duals, despite being trained on smaller 8x8 lattices.
101 Features constructed from all possible (up to gauge equivalence) link products in grid (not used in the training loss): Figure 18 & 19 shows the plots for approximate duals found by the framework and those from the hypothesised approximate duals. Even this exhaustive set of features shows strong alignment with the theoretical dual, reinforcing the robustness our approach.
14

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison E (0.2,0.25.0.3)
0.35
X
Shape Theoretical Dual
0.30
Appreximate Duals
Ifoun by our framework)
Meen Correlation
(Bo, Xn- 01 of or orginaal frame
0.15
0.20
0.25
0.10
B. 0.30
0.00
Original frame (8, (0.20,
x) Approximate
by our
0.20
(0.81, 00002)
(0,94, -0.16)
11:62,
(1.29. -1.49)
X (1.02, -0.251
x
(0.93, -0.13)
X
10.92, -0.13)
X
(1.01, -0.19)
0.16)
Mean Correlation
0.15
Marker Shape
Theoretical Dual
Approximate Duals
Ifound by framework)
0.05
Original frame framework
(8.x) Approkimate
(0.96, -0.31)
x
(0.61, 0.12)
(1.20, -0661
10.89, 0019)
0.25
X
(1.21, 0.551
X
(0.70, 0.01)
(0.68, 0.04)
X
[0.74, 00.05)
0.17)
Mean Correlation
0.20
Marker Shape
0.15
Theoretical Dual
Approximate Duals
by framework)
0.05
0.00
Original frame (0.30.00
x3.x) Appreximate
by our fremework
0.35
(0.89, -0.34)
X
(0.61, -0 0.000
(1.18.-0.22)
(0.61.0.00)
0.30
X
(0.48, 0.16)
x
(0.48, 0.17)
x 10.50, 0.16)
X (1.06, -0.50)
10.68,
Meen Correlation
0.25
(0.68,
-0.09;
Marker Shape
0.20
Theoretical Dual
Approximate Duals
by framework)
36
10
12
16
22
Feature Index
Figure 14. (Framework) The moments (product of consecutive links a linear chain in lattice of size 24x24) computed from the approximate duals found by framework closely match those of theoretical duals.
15

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison all (0.2. 0.25.0.33
0.35
Theoretical Dual
0.30
Approximate Duals
Bacel
0.25
(Bc, Knm of orignnal frame 0.20 0.25 B. = 0.30
0.15
0.10
0.05
0.00
Festure
Original frame (8,x) (0.20,0)
Approximate along x+x== Raus
0.20
10.6, 0.2)
(0.8, 0.00
(1.0.-0.2)
(1.2. 0.4)
x
[0.7. 0.13
X
(0.9, 00.1)
(1.1,-0.3 -0.30
X
(1.3, -0.5
0.15
Shape
Theoretical Dual
Approximate Duals
Ba.al
0.05
0.00
Index Original frame (B.x) (0.25,0)
0.30
Approximate along Baus
0.25.
(0.7.
(0.9, -0.2)
(1.1, 0..4
0,25
X (0.6, 0.1)
X (0.8, 0.1)
(1.0, 00.)
X
(1.2, 40.5)
0.20
Marker Shape
0.15
Theoretical Dual
Approximate Duals
Pavel
0.10
0.05
0.00
Original frame (0.30.
Approximate elong + Ras
0.35
10.4, 0.2)
(0.6,
(0.8, -0.2)
(1.0. 0.4)
(a.5, 0.1)
(0.7, 0.1)
(0.9, -0.3)
x
(1.1, -0.)
0.30
0.25
Shape
Theoratical Dual
Approximate Duals
Baaal
0.10
0.05
0.00
14
Feature Index
Figure 15.. (Hypothesis). The moments (product of consecutive links in linear chain in a lattice of size 24x24) computed from the approximate duals along the hypothesized line const) closely match those of theoretical duals.
16

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison all (0.2. 0.3)
Shape Theoretical Dual
(Bc. original
f. 0.20
1.0
X
(found by our fremework)
Asprodimate Duals
0.25
0.30
Nean Correlation
0.8
0.6
0.4
Original frame K) (0.20,
Appraximate
by our
1.2
(0:81, 00.02)
10.94, -0.16)
11.62. -0.84)
(1.29. -.499
x
(1.02,-0.25) -0.251
X
10.93, -0.131
10.92, -0.13)
(1.01, -0.19)
x
10.65,
Mean Correlation
0.8
Marker Shape
Theoretical
0.6
X
(found framework)
Approximate Duals
0.4
0.2
Original frame (0.25,00
(8.x) Approximate
by
1.0
(0.96, 00.31
[0.61, 0.12)
(1.28, -0.111
10.68, -0.199
x
(1.21, 0.55)
10.70, 0.01)
(0.66, 0.04)
X
10.74,
Mean Correlation
Marker Shape
Theoretical
0.6
X
(found framework)
Approximate Duals
0.4
0.2
Original frame K) (0.30.
Approximate
by our
1.0
(0.89, -0.34)
10.61,-0.. (.000
11.18. -0.62)
(0.51. 0.00)
X
(0.48, 0.16)
10.48, 0.17)
x 10.50, 0.16)
X (1.06, -0.50)
10.68. -0.09)
Mean Correlation
0.8
(0.68, -0.99
Marker Shape Theoretical Dual
0.6
Approximate Duals
(found framework)
0.4
Feature Index
Figure 16. (Framework) The moments (13 features constructed from link products used in the training loss) computed from the approximate duals found by our framework closely match those of theoretical duals.
17

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison
(0.2. 0.3)
Shape Theoretical Dual
(Bo. ginel
B: 0.20
1.0
Approximate Duals
B: 0.25
x Bowi)
0.8
0.6
Original frame 0)
().x) Approximate along x Pau
(0.6, 0.21
10.8, 00.0
(1.0, -0.2)
(1.2,
1.0
(0.7. 0.11
X
10.9. -0.11
X
[1.1, -0.3
X
(1.3, (0.5)
0.8
Marker Shape
0.6
Aporoximate Duals
Rawi)
0.4
Original frame 0)
x) Approximate along Baua
1.0
(0.5, 0.21
(0.7.-0.0)
10.9, 0.2)
(1.1, 0.44
(0.5, 0.11
X
(0.8, 0.11
X 11.0, 0.3)
X (2.2, .0.5)
0.8
Marker Shape Theoretical
Aporoximate Duals
Aawi)
Original frame (B, (0.30, 0)
() Approximate along Paui
(0.4, 0,21
(0.6, -0.0)
10.6, -0.2)
(1.0.
(0.5 5, 0.11
(0.7. .0.1)
X (0.9, .0.))
X (0.5)
0.8
Marker Shape
0.6
Approximate Duals
Raw)
Feature Index
Figure 17. (Hypothesis) The moments (13 features constructed from link products used in the training loss) computed from the approximate duals along the hypothesized line (9 const) closely match those of theoretical duals.
18

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison
(0.2. 0.3)
Shage
No ginel
Theoretical Dual
B: 0.20
Aparoximate Duals
B: 0.25
(found by our framework)
0.6
0.2
DB0
0.0
Original frame (B, 0)
(B.x) Approximate
fremework
1.2
(0.81. 0.02))
(0.94, -0.161
[1.62, -0.84)
(1.29. -0.49)
(1.02, -0.25)
X
(0.93, -0.13)
X
[0.92, -0.13)
X
11.01.-0.19)
1.0
0.8
Marker Shape
Theoretical Dual
0.6
Aparaximate Duals
(found by framework)
0.4
Original frame (B, 0)
[8.x] Aparoximate
by framework
(0.36)-0.31)
(0.61, 0.12)
(1:28, -0.11)
(0.80, -0.19)
(1.21, 0.55)
X
(0.70, 0.01)
x (0.56, 0.04)
(0.74, -..05)
Marker Shape
0.6
Theoretical Dual
Aparoximate Duals
(found by framework)
0.4
0.2
0.0
Original frame (B, (0.30, 0)
Approximete
fremework
-0.34)
(0.61, -0.00)
[1.18, 62)
(0.61. 0.001
(0 48, 0.16)
(0.48, 0.17)
x
[0.50, 0.16)
x
(1 10.06, -0.50)
(0.75.
0.8
(0.68, -0.09)
Marker Shope Theoretical Dual
0.6
Aporoximate Duals
by framework)
0.4
X
0.2
0.0
Feature Index
Figure 18. (Framework) The moments (101 Features constructed from all possible (up to gauge equivalence) link products a grid (not used in the training loss) computed from the approximate duals found by framework closely match those of theoretical duals.
19

---

A Machine Learning Approach to Duality in Statistical Physics
Comparison
(0.2. 0.3)
Shape Theoretical Dual
No ginel
B: 0.20
Aparoximate Duals
B: 0.25
k Bown)
0.6
0.2
3B0 3 DBC
0.0
Original frame (0.20, 0)
(B.x) Approximate along Poul
(0.6, 0.21
10.8, 0.00
(1.0. -0.2
(1.2, (.44)
(0.7. 0.11
X
10.9. -0.1)
X
(1.1, 00.)
X
(1.3, +0.5)
0.8
Marker Shape
0.6
Approximate Duals
Pawi)
0.2
Original frame 0)
x) Approximate along Baua
(0.5, 0.21
(0.7, 0.001
10.9, 0.2)
(1.1, 0.44)
(0.5, 0.11
X
(0.8, 0.11
11.0, 0.3)
(2.2, .0.5)
Marker Shape Theoretical
Approximate Duals
0.2
0.0
Original frame (B, 0)
x) Approximate
elong Paui
1.0
(0.4, 0.21
(0.6, -0.0)
10.6, -0.2)
(1.0.-0.4)
(0. 5, 0.11
(0.7. 0011)
(0.9, .0.)
(1.1, (0.5)
0.8
Marker Shape Thcorctical
0.6
Approximate Duals
0.4
0.2
25000C
X6c
0.0
Feature Index
Figure 19. (Hypothesis) The moments (101 Features constructed from all possible (up to gauge equivalence) link products a grid (not used in the training loss) computed from the approximate duals along the hypothesized line (33 const) closely match those of theoretical duals.
20


Reviews:
[{"review_id": "9ubo94zyXI", "reviewer": "Reviewer_k86m", "summary": "This paper develops a machine learning method to find dualities in statistical physics models. The authors turn duality discovery into an optimization problem by using neural networks to map between original and dual models. They create a loss function that matches correlation functions between the two descriptions. The method successfully finds the known Kramers-Wannier duality for the 2D Ising model, getting both the temperature mapping and how observables transform. They also study the plaquette Ising model, showing it likely doesn't have simple self-dualities, though they find interesting \"approximate dualities\" in ordered phases. The work carefully analyzes optimization problems and uses variance reduction to make training work better.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We thank the referee for their careful reading and interesting questions. We believe each of their three questions are interesting starting points for future research, and our more precise responses are below: \n\n1. **How would the method work for systems with continuous symmetries where there are many more possible dualities?** In principle, the philosophy of the method – matching moments of an appropriate subset of observables – would still work for a system with continuous symmetries (e.g. we see no real reason why we could not obtain particle-vortex duality in 3d systems with a continuous U(1) symmetry, etc.). In practice, it seems conceivable that computationally this would be more onerous, as it would take longer to equilibrate the system when doing MCMC sampling (generally there would be gapless modes associated with Goldstone modes of the continuous symmetry which take longer to thermalize). \n\n2. **Is it possible to adapt this to quantum systems by working with transfer matrices?** We think that it should be possible to use a similar approach for quantum systems without a sign problem: we would use the usual Trotter approach to reduce the quantum problem to an effective classical problem that could be simulated using very similar techniques. The problem would now be strongly anisotropic (as the time direction is now quite different from the spatial ones) and some thought should be put into the correct form of the neural network that maps observables (presumably it would also be strongly anisotropic) but in our opinion this would be manageable. \n\n3. **Is it worth exploring other neural networks that might better capture long-range correlations?** Yes: making the neural network for the mapping have a larger spatial extent (i.e. going to “n” hops away on the lattice where n is a small number) is something that we are currently actively investigating as indeed some systems might require the need to capture longer-range correlations. Training becomes more difficult as this mapping is made more and more non-local. In principle there are known examples of duality (AdS/CFT being a particularly dramatic example) where the mapping is completely non-local; we do not think that our approach will reliably be able to find such examples as the space of mappings is simply too large. \n\n--- \n**Finally, in response to the question about what the approximate duals reveal about the ordered phase:**\n\nThe approximate duals essentially describe a regime where the physics can be approximated by isolated single-spin flip events; this explanation shows that many different models are expected to flow to this regime, giving an example of the universality of RG (and conversely highlighting the difficulties in pinpointing the original Hamiltonian from data in such a regime)", "claims_and_evidence": "The main claims are supported by numerical results. The rediscovery of Kramers-Wannier duality seems convincing. Their negative result about the plaquette model's self-dualities is also supported by extensive testing. The explanation of why certain parameter combinations give similar results in ordered phases seems insightful.", "methods_and_evaluation_criteria": "The methods make physical sense. Using neural networks to map observables gives enough flexibility while keeping physical meaning. Their loss function based on correlations is reasonable for comparing physical systems.", "theoretical_claims": "The theoretical claims are in in general justified.", "experimental_designs_or_analyses": "The experiments reveal real some physical insights. The method struggles near the critical point and in the ordered phase, which can reflect actual physics rather than just technical problems. Their analysis of how the attention picks out the dual lattice is reasonable. The tests of different lattice sizes show what's practical while being honest about computational limits.", "relation_to_broader_scientific_literature": "This work combines statistical physics and machine learning in a novel way. While others have used machine learning for physics problems, turning duality discovery into optimization is novel. It adds to existing analytical methods for finding dualities while potentially letting us find new ones.", "essential_references_not_discussed": "The reference seems comprehensive. Additional discussions on neural networks with symmetries seem relevant.", "other_strengths_and_weaknesses": "The paper's main strength is its reframing of duality discovery as machine learning. The physics interpretations are clear and they're honest about the limitations. The main drawbacks are computational speed and handling more complex models. Additional discussions on what the approximate dualities tell us about ordered phases can be beneficial.", "other_comments_or_suggestions": "No other comments.", "questions_for_authors": "1. How would the method work for systems with continuous symmetries where there are many more possible dualities?\n2. Is it possible to adapt this to quantum systems by working with transfer matrices?\n3. Is it worth exploring other neural networks that might better capture long-range correlations?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "8NtvIsL8JW", "reviewer": "Reviewer_aEBk", "summary": "A methodology is developed for automatically finding duality transformations\non  lattice gauge theory models (actually simple 2D Ising models are considered\nin this paper as a proof of concept). This duality transformation is an important tool in physics as it\ncan allows one to access physical properties of systems in the so-called non-perturbative regime, i.e.\nwhen the coupling constant are too strong to perform any perturbative expansions analysis which is otherwise intractable.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## **Code Availability & Moments & Reproducibility**\n We would like to kindly remind the referee that a full working code was provided in the supplementary material. Feature computation is handled by `src.utils_ising.generate_masks` (which generates 13 link product masks) and `src.utils_ising.feature_samplewise`. We will also open-source the code and experimentation scripts to ensure full reproducibility.\n\n**Training Features**\nWe use a specific set of link product moments in the training loss. These are visually illustrated in this plot (https://anonymous.4open.science/r/temp_rebuttal_repository-0225/images/features.png), where the red highlights indicate the link products averaged across the lattice and samples to form statistical features. \n\n## **How is our work different from  Betzler,Krippendorf ?**\n\nBetzler-Krippendorf has a somewhat different focus, which includes an investigation of the advantage of a variety of different known dual representations. The part of this paper with the most overlap with ours is Section 3.3. The key differences are the following: (1) the input into the duality mapping is spin configurations sampled in the original frame, after which a *second* step of sampling is done: this is not the usual setup for duality in physics, where one usually just samples once (importantly, in a dual frame) and then performs a deterministic mapping, as in our work. (2) It seems that the loss function used in that work cannot be formulated unless the duality mapping of temperatures is known already, and thus that this work cannot be used to find *new* dualities, which our formalism in principle allows. \nWe will include this discussion in the updated version of our manuscript.\n\n\n## **Practical use case of our work**\n\nWe have a somewhat broader perspective on duality transformations: we do not think that they are used only to compute n-point functions. Rather they provide an important perspective on the structure of the underlying physics. In particular, Kramers-Wannier duality is important not for calculations because it is the simplest example of an order/disorder duality. The discovery of a genuinely new duality – based on novel principles – would have a huge impact on physics in general. \n\nIn addition to the above orientational remarks, we would like to provide two more concrete directions that we hope to explore with this technology on a short time scale. \n\n1. Much recent work (summarized in https://arxiv.org/abs/2308.00747) has focused on points in parameter space which are *self-dual*, in which there is a new symmetry of an exotic “non-invertible” type. Little is known on how these symmetries work in more general theories (such as the plaquette Ising model) – for example we do not know whether the symmetry exists on the phase-transition line away from \\kappa = 0. Understanding whether or not a self-duality can exist at all away from \\kappa = 0 is an important first step in understanding the symmetry. \n\n2. There exist models with interesting phase transitions (e.g. the simple case of bond percolation, reviewed in https://arxiv.org/abs/math-ph/0103018) that are not described by any *known* local model. It is very interesting to ask whether there can be a (perhaps complicated) local model that describes them. \n\nIn both of these cases, we anticipate learning about deeper questions from the existence of a duality. In our eyes this is the true value of our work. \n\n## **Do Dualities Reduce to Fourier Transforms?**\n\nIn our opinion, many dualities go beyond Fourier transformations (a well-known example is AdS/CFT, which has no simple Fourier interpretation at all). As described above, our hope indeed is that other kinds of dualities – based on fundamentally new ideas – could be unveiled using these methods. One concrete example is Chang duality in \\phi^4 theory (https://journals.aps.org/prd/abstract/10.1103/PhysRevD.93.065014). As we comment in the rebuttal to referee 3, our methods could realistically be applied to the discovery of such dualities, which are under intense investigation in the hep-th community.\n\nLet us also note that our approximate dualities are already quite interesting and novel!\n\n\n## **Sampling in the strong coupling regime**\n\nFor these models the difficulty of sampling using MCMC in both the strong and weakly coupled regime is basically the same. (Difficulties arise close to the critical point where critical-slowing down causes familiar but surmountable problems). Obtaining analytic results (e.g. Feynman diagrams etc.) is of course hard at strong coupling, but – very importantly – our formalism does not require this at all. \n\n## **Phase Dependence of the Method’s Performance**\n\nFor statistical physics model this strong-weak paradigm is not really relevant; we should stress that it is equally easy to sample in both phases. The reasons why our methods work best in one phase seem more subtle and related to well-known difficulties encountered in the inverse Ising problem.", "claims_and_evidence": "The paper constitutes mainly a methodological proof of concept based on experimental observations.\nIt is shown for instance that on the 2d Ising model, dual couplings and dual variables on the dual lattice  are\nproperly recovered numerically over some range of temperature.", "methods_and_evaluation_criteria": "The method is based on moment matching with MCMC sampling and a property of duality that relates primal and dual moments, involving nearest neighbour variables. A certain number of well (manually) chosen link product of these variables \nare estimated by sampling both the primal model and a candidate dual model parameterized by a neural network. The optimization stops when primal and candidate dual moments coincide. The methodology makes sense for the problem  at hand, and gives in principle  \nmore precise information than previous methods cited in the paper.", "theoretical_claims": "There are no theoretical claims.", "experimental_designs_or_analyses": "The NN parameterizing the dual model is a simple Boolean vector function using Gumbel soft-max to enforce sparse solution for the weights, taking as input as set of candidate binary links values (+-1) and returning a moment value. \nThe set of compound moments which are used to define the loss are not given, neither the code. I believe the experiments are correctly done, but these are not easy to reproduce with the information provided in the paper.", "relation_to_broader_scientific_literature": "There are few references on the subject, the main one seems to be Betzler,Krippendorf  which basically motivates the problem and propose unsupervised methods to find duality relations. It is cited but not much discussed, in particular comparative  merits with respect to the overall motivation is not detailed.", "essential_references_not_discussed": "I did not find that an important reference was missing.", "other_strengths_and_weaknesses": "The proposed method is sound, the interpretation of the results shown is quite clear but the experimental test is very limited. \nThe question addressed in this work is interesting but it looks to me as a  preliminary work as the method is tested on elementary example (the 2D Ising one), and a less elementary one, namely 2D Ising + plaquette four spin interactions. But on this last example no duality transformation is to be found in general and leads experiments to output kind of spurious results . More generally I am a bit perplex about the overall practical interest of this study, which appears to me as being mostly at the level of a  curiosity without practical use.\nUsually duality transformation are used to address the strong coupling regime in order be able to compute n-points correlations.", "other_comments_or_suggestions": "no additional comments", "questions_for_authors": "I would like to ask more on the general scope of the paper. \nMost of,  if not all (would you agree? ) duality transform correspond to a Fourier transform over some compound primal degrees of freedom (see e.g. Cardy, \"Scaling and Renormalization in Statistical Physics\"). Do the authors expect to unveil new kind of dual transformations with this method? Ultimately what kind of models would that be of interest to learn new physics? is it realistic considering the fact that the method requires to sample at least once a model in the strong coupling regime?\n\nIn complement to this, here the method requires to sample both the primal and all candidate dual models, so  that I would expect that the relevant setting corresponds to the primal being strongly coupled, so that we can hope to be able to sample easily all the dual candidates. Then How is it that the most convincing experiment displayed corresponds the (wrong?) setting, i.e. when the primal model is  weakly coupled (high temperature).", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "Osy31EUtAE", "reviewer": "Reviewer_8KMu", "summary": "This paper show cases a machine learning approach to find dual models in statistical physics. The authors outline a training procedure to find an ML model that can match the observables estimated from two statistical physics systems. If such a match is found for two different Hamiltonians then that points to the existence of a duality transform between these two models. The authors discuss a variance reduction technique to improve the convergence of their learning algorithm. They test their method on the 2D Ising model and an Ising model with plaqueete interactions.  They rediscover the duality of the 2D Ising model and draw some interesting conclusions about the plaquette model.", "questions": "", "limitations": "", "rating": 2, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "## **Stronger evidence of approximate duality**\n\nWe thank the reviewer for the suggestion and agree that additional evidence strengthens our claims. We now provide such evidence, showing that a broad set of moments—including correlation length—is accurately matched across approximate duals. This close agreement suggests that the essential physics is preserved, a novel result to our knowledge.\n\nTo assess generalization, we compare feature statistics between approximate duals (both found from our experiments in the paper and from the hypothesized line $\\beta + \\kappa = const$) and the corresponding theoretic duals. Importantly,\n- We evaluate various features not included in the training loss \n- We compute these features on larger $24 \\times 24$ lattices, beyond the training regime\n- We include approximate duals along the hypothesized line for comparison\n\nDue to computational constraints, training directly on large lattices like $24 \\times 24$ is infeasible. Instead, we apply the learned mappings $G_{\\theta}$ from $8\\times8$ lattices to estimate features on larger systems without retraining. \n\nIn all the plots, the top panel shows average feature values across all approximate duals for $\\beta_0 \\in \\\\{0.2, 0.25, 0.3\\\\}$ —the original-frame $\\beta$ values that yielded these approximate duals, and the lower panels show individual approximate duals (marked by x). Squares mark the features corresponding to theoretical dual configurations. \n\nWe consider three categories of features. For each category, we present two plots: (Framework) one based on approximate duals found by our framework, and (Hypothesized) another based on duals inferred from the hypothesized line $\\beta + \\kappa = const$, where the constant is chosen to intersect the known dual point $\\beta_{\\text{dual}}$. All links point to an anonymous repository hosting the plots.\n- **Product of consecutive links in a linear chain in a lattice of size 24x24:** There are  24 such features. (not used in the training loss)\n  - Framework (https://bit.ly/4hQnMJH)\n  - Hyopthesized (https://bit.ly/4jhTOj7)\n  - Both sets of approximate duals closely match theoretical expectations\n\n- **13 features constructed from link products used in the training loss:** \n   - Framework (https://bit.ly/4lq2vtw)\n   - Hyopthesized (https://bit.ly/41TzC16)\n   - These features match well across both sets of approximate duals, despite being trained on smaller 8x8 lattices.\n\n- **101 Features constructed from all possible (up to gauge equivalence) link products in a $3\\times3$ grid**:   (not used in the training loss)\n   - Framework (https://bit.ly/4lt5Tnx)\n   - Hyopthesized (https://bit.ly/42rEtGM)\n   - Even this exhaustive set of features shows strong alignment with the theoretical dual, reinforcing the robustness of our approach.\n\nRegarding Figure 6, we appreciate the suggestion and will revise the caption to provide a clearer explanation, helping readers better interpret the figure. \n\n## **Simplicity of ML methods**\n\nAlthough the ML methods are indeed simple, they certainly involve new important ideas; we did not find anywhere in the literature the task of learning both parameters in a Hamiltonian and an observable. We also thought that the application of these methods to statistical physics models was sufficiently broad, since it is one of the major branches of theoretical physics. \n\nWe could however have further emphasised the broader applicability of these methods; one such is Hamiltonian truncation, where the task is to compute the spectrum of some truncated hamiltonian to gain insights into the behaviour of the physical systems; it is routinely applied to the study of QFT phenomena, such as duality. RG flows, etc. Our methods could for instance be used in this context to discover accidental dualities like Chang duality (https://journals.aps.org/prd/abstract/10.1103/PhysRevD.93.065014), which have so far received no systematic explanation. More precisely, the task in this context would be to fit parameters in a truncated hamiltonian such that the distance between the eigenvalues of the hamiltonian, or the eigenvalues of some related observable of different models are minimised. This is precisely the type of task discussed in this paper.\n\n## **Deviation from the hypothesized $\\beta + \\kappa$ line**\n\nWe believe this happens because the idea that the physics is completely determined by $\\beta + \\kappa$ (as explained on p6, where this determines the single spin-flip probability) is an approximation; in practice there is always a finite probability for two spins to flip together, and in this case the observables will depend on \\beta and \\kappa individually. We believe this is the reason for systematic movement off of the $\\beta + \\kappa$ line. \n\nWe stress there is also likely a statistical reason for the movement off the line; not all runs find equally good minima of the loss due to random initializations etc. There is scope for improvement of this through engineering improvements.", "claims_and_evidence": "The claims made in the paper are supported by limited evidence. The main claim of the paper is that duality transforms can be discovered by an ML algorithm. This is only demonstrated for the 2D Ising model, which is possibly the simplest example one can demonstrate this on.", "methods_and_evaluation_criteria": "Yes they do make sense. But a larger suite of experiments would have been ideal", "theoretical_claims": "There are no major theoretical claims here to check.", "experimental_designs_or_analyses": "See questions/suggestions", "relation_to_broader_scientific_literature": "Duality is an important notion that used to study models in statistical physics. The notions of duality used in this paper are derived from existing works in the filed (eg. https://journals.aps.org/rmp/pdf/10.1103/RevModPhys.52.453)  I am not aware of papers that try to learn duality transformations explicitly from data.", "essential_references_not_discussed": "N/A", "other_strengths_and_weaknesses": "Strengths:\n\nThis is a well written paper which deals with a very interesting problem in statistical physics. The results are very encouraging and the authors are very straight forward with their findings and future directions.\n\nWeaknesses:\nThe main weakness of this work is limited experiments. The only experiment that shows that such a duality transform can be learned is done for the 2D Ising model. This is the simplest case with a known answer. For the plaquette model, the method seems to find some sort of approximate duality in the ordered phase, but the evidence for this is weak. Also, there must be a  set \"testing\" experiments that show that the learned dual model reproduces the essential physics of the original model.", "other_comments_or_suggestions": "The paper can be improved by:\n\n> More experiments that show that this works in non-trivial settings.\n> Better figure captions and may be even a different approach to presenting the results visually. For instance, figure 6 is very hard to parse. It would be better if it is split up into smaller figures that support specific conclusions in the text.\n> Overall this is a good idea but might be better suited for a physics journal. The ML approaches used here are fairly simple and they do not have wide scale applicability beyond studying stat. phys. models.", "questions_for_authors": "> For Fig.6 the learned points actually seem to deviate from the \\beta  + \\kappa line. What is the cause of this error?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: As noted by the referees, the submission's strenght is its novelty, namely the proposed mapping of a genuine, fundamental statistical physics problem, i.e., searching for duality, in a machine learning optimization problem. The approach appears to have natural practical limitations and in particular might be computationally challenging in complex models: as stated by the referees, the investigation can be seen more as a "proof of concept" on the simplest possible model of a general strategy that might otherwise be hard to apply. However, as first on the proposed method, the paper can be nevertheless inspiring for future investigations in statistical physics, as the theoretical investigation can highly benefit from the discovery of fundamental properties such as duality. I recommend the authors to expand the comparison of their work with the one of [Betzler and Krippendorf](https://onlinelibrary.wiley.com/doi/abs/10.1002/prop.202000022). In light of the overall positive feedback and the novelty, I recommend *Weak Accept*.
Decision: Accept (poster)