Manuscript Offprint
arXiv:2610.36673Atom as an Agent: Emergent Order by Collective Predictive Coding
PTEP
Prog. Theor. Exp. Phys. 2015, 00000 (34 pages) DOI: 10.1093/ptep/0000000000
KUNS-3134
Atom as an Agent: Emergent Order by Collective Predictive Coding
Koji Hashimoto and Tadahiro Taniguchi
Physics Department, Kyoto University, Kyoto 606-8502, JAPAN
*E-mail: koji@scphys.kyoto-u.ac.jp
Graduate School of Informatics, Kyoto University, Kyoto 606-8501, JAPAN
*E-mail: taniguchi@i.kyoto-u.ac.jp
What is the intrinsic reason of emergence of macroscopic order parameter out of microscopic systems? In this article, we apply to physics the collective predictive coding (CPC), the theory of language/symbol emergence. As our language emerges out of our human communications, physical macroscopic order parameter emerges out of communications among atoms — each atom is regarded as an agent who predicts each other's behavior through inference. We present three examples of classical spin systems: two-dimensional ferromagnetic and antiferromagnetic Ising models, a two-dimensional spin model with competing stripe orders, and the fully connected Sherrington–Kirkpatrick spin-glass model. In all of these examples, proper macroscopic order parameters including the replica overlap emerge automatically through communication informatics of CPC, only from observed spin configurations. We call the learned macroscopic coordinate the collective predictive order. Furthermore, for the ferromagnetic and antiferromagnetic Ising models, the equilibrium distribution of the collective predictive order yields an emergent potential with the symmetry and thermal evolution characteristic of a Landau potential. Notably, the emergence of the collective predictive order does not refer to any structure of microscopic Hamiltonians/Lagrangians. Thus our “Atom-as-an-Agent” (AaaA) principle offers a completely data-driven method for the emergence of macroscopic order, that is, machine learning physics.
1 The problem of order parameter emergence 2
2 Collective predictive coding 4
3 Emergent order parameter 8
4 Emergent potential 17
5 Agentic communication between atoms 23
6 Conclusion and discussion 29
© The Author(s) 2012. Published by Oxford University Press on behalf of the Physical Society of Japan. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by-nc/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
1. The problem of order parameter emergence
Known is the critical importance of emergence in physics, while the reason of its existence has not been revealed. Numerous examples of the physical emergence include, for example, classical physics emergent from quantum physics, and classical spacetime emergent from quanta in holographic principle [2–4]. It is rather natural that the emergence is not physically explained, because the emergence is the un-explanability of collective phenomena; suppose some microscopic ingredients exhibits collectively some distinguishable property which cannot be explained by the ingredients’ own property directly, that is when it is called emergent. If this is truly the case, we may have to give up a direct derivation of, say, order parameter of the emergent phenomena, under the viewpoint that any physical derivation should be accompanied by some explainability.
However, from a meta-level of viewpoint, the reasoning above has a pitfall. When we say we explain a certain phenomenon, we use some notions which are shared by us physicists, and the explainability actually depends on the popularity of the notions used in the community. Physical notions have been born and renewed through communication among physicists and through discovery of new phenomena in experiments and theories. Physical notions, such as the order parameters, were born as a language with which physicists communicate. Thus, this historical aspect of how physical notions are born in physics can be a hint for discovery of a possible mechanism of emergent phenomena in physics, and a possible reason of the existence of the macroscopic variables.
To this end, we are motivated to utilize an information-theoretic theory of language/symbol emergence, called Collective Predictive Coding (CPC) [5, 6], to find the mechanism of emergence in physics. This theory is defined with an information-theoretic inference free energy which models how languages are emergent through communication between agents. CPC was proposed as a computational account of symbol emergence systems, in which individuals develop their own perceptual representations through interactions with the environment, while shared symbol systems emerge through communication [7]. Human society is a typical example of such a system. More concretely, CPC theorizes the structure of communication, and learning to jointly explain the agents' observations leads to the emergence of a common shared notion, which serves as a language among the agents. Each agent predicts its own observations using its local probabilistic prediction model, while the shared variable connects these models into a collective predictive description.
As our application of CPC to physics, we regard each atom as a CPC agent. Here a CPC agent is a unit that uses a local probabilistic prediction model to infer a shared variable from its observations and learns the parameters of that model. Each atom observes its state, for example its spin. Each atom uses its local probabilistic prediction model to predict its own spin observation from the shared variable, and participates in inferring that variable through communication. Through communication and learning, the shared variable acquires a collective meaning: the local probabilistic prediction models together predict the whole spin configuration. The emergent language should be nothing but the order parameter of the whole system, because the order parameter in physics is a macroscopic variable which
For a philosophical discussion of emergence and reduction in physics, particularly the relation between microscopic and macroscopic descriptions, see Ref. [1].
2/34 characterizes the behavior of the whole system in a concise manner. The order parameter singles out the most essential ingredient of the system and dictates the phase structure of the system, and sharing this order parameter value among agents is the most efficient way to reproduce the whole system behavior. Thus, CPC is the key to the emergence of the order parameter.
We call this the Atom-as-an-Agent (AaaA) principle. In this paper, we implement this principle using CPC. If this actually works, from just the observation of each atom's spin configuration, improving the collective predictability of the observed spin configurations should lead to the automated discovery, or the emergence, of order parameters of the system.
In this article, we demonstrate that the AaaA principle works for classical spin systems, by showing that through the AaaA principle the known order parameters emerge. We present three examples: (i) two-dimensional ferromagnetic and antiferromagnetic Ising models, (ii) a two-dimensional spin model with competing stripe orders, and (iii) the fully connected Sherrington–Kirkpatrick (SK) spin-glass model. The first model (i) is the most basic among physics, and the emergent order parameter is the magnetization which is a coordinated average of spins. The second example offers a check if both of the two competing orders in the model can emerge. The last example is about the emergence of the replica overlap as a collective predictive order. In all of these examples, the collective predictive order, which automatically emerges from the spin observation data only, is shown to agree closely with the known order parameter, up to a nonlinear map.
What needs to be emphasized as for the AaaA principle is that for the emergence of the order parameter one does not need to know the structure of the Hamiltonian. Only the observed spin configurations are necessary to pin down the order parameter. Readers know that in physics textbooks normally the order parameters are introduced with the help of symmetries of the Hamiltonian, since spontaneous symmetry breaking caused by the condensation of the order parameter determines the phase diagram of the system. On the other hand, our AaaA principle is completely data-driven; the order parameters emerge without any information on microscopic structure of the Hamiltonian, such as symmetries.
In this paper, we examine concretely the AaaA principle in two stages: we first identify collective variables and their thermodynamic properties using centralized CPC (Secs. 3 and 4), and then investigate how an ordering pattern can be learned through communication between individual sites (Sec. 5).
In Sec. 3, we test both the correspondence of the learned coordinates with known order parameters and their ability to predict unobserved spins from observations at other sites. In Sec. 4, we use the equilibrium distribution of the learned coordinate to reconstruct a Landau-like free-energy potential for the ferromagnetic and antiferromagnetic Ising models. The resulting potentials evolve from two wells to one on heating, and yield finite-size estimates of the transition temperature consistent with the known critical point. Thus, the construction connects the discovery of a collective variable to the thermodynamics of its fluctuations.
In Sec. 5, each site acts as an agent: it proposes a value of the shared variable using its own observed spin, while neighboring sites assess that proposal using their local probabilistic prediction models. Alternating these exchanges with updates of the local probabilistic prediction models learns a common ferromagnetic pattern from random initial weights. This procedure is called Metropolis-Hastings naming game (MHNG) [6, 8] in the context of CPC, and we apply a generalized form of MHNG to the spin system, to find out that the agentic
3/34 communication in fact properly learns the order parameter. This provides a concrete realization of the AaaA principle: the microscopic agents learn how their individual observations relate to a shared macroscopic description.
We believe that this novel approach to emergence of order parameters or macroscopic variables opens a door toward revealing the mystery of emergence. From the viewpoint of a technique for solving physics inversely, in Sec. 6 we compare our AaaA principle with other machine learning methods for automated discovery of order parameter and phase transition.
2. Collective predictive coding
An order parameter captures the behavior of many spins in a common macroscopic variable. CPC explores a similar idea for language: shared words help individuals with different observations describe and predict the same world [5, 9]. Computer models show that communication can produce common names for objects and help agents learn object categories [6, 8].
Predictive coding (PC) describes how an agent predicts sensory observations and updates its internal representation of their causes using prediction errors [10]. Friston's variational formulation relates such inference and learning to the minimization of an information-theoretic free energy [11], of the form introduced below in Eq. (4). CPC extends this perspective to multiple agents to model symbol emergence systems, including human society, whose members' different observations are linked by a shared variable [5, 7]. Each agent predicts its own observations, while the collective system integrates their distributed observations through this variable.
For example, suppose agents are humans, and all humans look at a single apple in reality. Depending on from which angle each human observes the apple, the picture of the apple may differ for each human observation. Then humans communicate to establish a shared symbol (a sign), such as the word “apple,” for the object they are looking at. This is a situation of joint attention. Through communication and perceptual learning, they develop a shared use of the sign, grounded in each individual’s perceptual categories. Each person uses the sign to predict their own observations, while the sign links these different perspectives into a collective description of the object. CPC quantifies this situation through a generative model and information-theoretic free-energy minimization.
Following Sec. 1, we treat atoms as agents and seek a shared variable that predicts their spin configurations: a candidate order parameter learned from observations alone, without using the Hamiltonian. We now formulate this idea as a variational problem, specifying in turn the data, the probability distributions, and the quantities to be varied.
2.1. Local observations and a shared variable
Let label agents and label observed configurations. The fixed input is the data set
where is the local observation of agent in configuration . For a spin system, labels lattice sites and . All observations are held fixed throughout the variation which we describe below.
4/34
We introduce a shared, unobserved (latent) variable . In applications of CPC to symbol emergence, this variable represents a common name for an object observed by different agents. Here we allow a continuous as a candidate coordinate of the collective spin state. We relate it to the observations through the joint probability distribution
Equation (2) is called a generative model: first draw from the normalized distribution , then draw each from . The result is a model configuration . “Generation” means this statistical sampling procedure, rather than a physical evolution of the spins. Each factor describes an agent’s prediction of its own observation, whereas their product describes the collective prediction conditioned on . The agents connected through can thus be viewed as an integrated collective cognitive system, or a “super-agent” [12]. Here provides shared conditioning information for the local predictions, with its prior distribution specified by .
The product in Eq. (2) assumes that the observations are conditionally independent given w; correlations between agents are represented through this common variable. Within each configuration all agents refer to the same latent state, while different configurations have their own states. The parameters and are common to the entire data set. The latent dimension K and the families of normalized distributions are modeling choices, analogous in physics research to choosing a class of actions before varying its fields. The theoretical heart of CPC is this starting assumption of the structure (2).
It should be noted that, the agents’ inference task proceeds in the direction reverse to the generation described above: combining their local observations, they try to determine a distribution over the common w. This inference alternates with learning the parameters of the local probabilistic prediction models, as described below. The measured configurations themselves remain fixed during the learning. The learning determines the parameters and .
2.2. Variational principle
2.2.1. Variational free energy. CPC formulates the learning process as a variational principle. For each configuration labeled by , introduce an auxiliary probability density , subject to and . The variational degrees of freedom are the functions and the common parameters ; itself is the integration variable. Define
Each observed value is inserted into its corresponding local likelihood, averaged with the distribution for that configuration, and finally summed over all configurations. The optional regularization constrains the model parameters; the basic formulation has .
5/34
The reason we define the free energy like this will be clarified later, but here we note that one can further decompose the free energy and look at the decomposed meaning. Consider the decomposition
where . Here is the Kullback–Leibler divergence. The first term measures the difference between and ; the second measures the loss in predicting the observations.
The variational principle is
with and for each , while is held fixed. Thus both the configuration-dependent distributions and the parameters shared by all configurations are varied. This free energy is a dimensionless information quantity. The physical Hamiltonian and temperature enter only through the observed configurations indirectly; evaluating requires the data and the chosen generative model. The meaning of the variational principle (6) will be made clear as we explain the inference and the learning, below.
2.2.2. Inference of latent states. First hold fixed and vary . The stationary condition with a normalization multiplier is , giving
where solves to give the first equality, and the last equality in Eq. (7) uses Bayes' theorem: normalizing the joint distribution at the observed gives the conditional distribution of . Thus the optimized is the conditional distribution determined by the fixed observation through Eq. (7). This step is called inference. Indeed, the identity
shows that of Eq. (7) minimizes , since . Restricting to a chosen family gives an approximate inference scheme.
This clarifies the reason of our definition of the free energy by introducing auxiliary distribution . It is a strange way of writing, but the point is the structure of p given in (2): we want to determine the parameters under the constraint of the structure of the generative model.
In Bayesian terminology, and are called the “prior” and “posterior” distributions, respectively. These terms distinguish distributions without and with conditioning on a particular configuration . In the present variational problem, all observations are fixed from the outset, and can itself be learned from the full data set.
6/34
2.2.3. Learning the configuration distribution. Hold fixed and minimize over . This is learning: all configurations contribute to a common predictive rule. For example, each local probabilistic prediction model has gradient
Why is this gradient descent actually the learning process with use of the data ? To answer this question, let us look at the free energy which is minimized with :
The first term in fact measures the deviation of the model prediction against the data , as follows. To explain this in an easier way, let us define
where 1 is one when the condition holds and zero otherwise. This is called an empirical distribution. Equation (10) then becomes
with the entropy of the empirical distribution . Thus, the first term tells us that minimizing brings the model's configuration distribution closer to the observed frequency distribution in KL divergence. Here we have ignored the regularization for simplicity, and the entropy of the empirical distribution is of no importance because it is a fixed number given by the data.
This is how minimizing the variational free energy incorporates the statistics of the observations into the model. Regularization balances this fit against the chosen constraints on the parameters.
2.2.4. Numerical strategy: Alternating minimization and collective prediction. Inference and learning are called respectively the E-step and M-step of expectation-maximization (EM). The variational principle (6) is implemented numerically by alternating these steps as follows:
(1) Fix D, the model families, and ; initialize .
(2) At fixed , determine each using Eq. (7) (E-step).
(3) At fixed , update the common parameters to decrease (M-step).
(4) Repeat the two updates, monitoring F and the parameters for convergence.
These are two alternating minimizations of the same functional.
Two notes on the minimization: first, different initializations may lead to different local minima and should be compared. Second, with approximate inference, the corresponding variational bound will be optimized (note that the equality in Eq. (10) requires unrestricted optimization over so it may not be achieved during the learning).
7/34
2.3. Extracting the latent constituents
After the inference and the learning loops are numerically performed, the model parameters are determined. Then, from this determined generative model, how can we see the relation between the latent w and the data S? This reading-off method from the generative model leads to the automated discovery of a macroscopic variable made of microscopic variables.
Let us take a new configuration . After learning, parameters determine the conditional distribution for the new configuration through Eq. (7). A macroscopic coordinate can be extracted as
This is the relation between the latent variable and the configuration . The collective aspect of this expression is explicitly seen in Eq. (7): each agent contributes to , together with the common term and a normalization constant. The choice of is learned so that the whole set of agents' inference agree with each other as a single , thus the architecture is optimized so that the macroscopic variable represents the configuration appropriately.
The learned coordinate provides a candidate order parameter whose physical meaning is established by its predictive power. Its physical significance is measured by its relation to symmetries and phase transitions. Its form depends on the chosen model class, while its parameters are determined from the observed configurations. We call the learned coordinate the collective predictive order. In the following sections we examine this correspondence for classical spin systems.
3. Emergent order parameter
We now ask whether the collective predictive order defined in Sec. 2 numerically emerges and acquires the meaning of a physical order parameter. Three examples test progressively different requirements: (i) a scalar magnetization, (ii) two competing stripe orders, and (iii) an overlap between replicas of the fully connected SK spin glass. Here (i) is for demonstrating the reproduction of the most popular spin model, while (ii) is a study whether our CPC can actually count a necessary number of order parameters. And (iii) is of course to study whether the CPC can find one of the most nontrivial order parameters known, the replica order. In all the examples, as we have emphasized, the Hamiltonians below specify only the ensembles used to generate the data; they are not supplied to CPC.
3.1. A local probabilistic prediction model and the learned coordinate
For Ising observations , take and specialize Eq. (2) to the following generative model
(14)
This model realizes its conditional mean as . Each site has its own freely learned and -component , and the model parameters, previously written as are now (and ). No symmetry such as uniform, staggered, or stripe pattern
8/34 is imposed on the training parameters. The regularization is
The objective uses the sum over configurations in Eq. (3), without dividing it by the sample count. At fixed parameters, Eq. (7) determines the conditional distribution of w by Bayes' theorem. We evaluate its integrals by numerical quadrature and update the site parameters by Newton steps on the concave local learning objectives. Thus this implementation uses explicit probability distributions, without a neural network.
We use the conditional mean in Eq. (13) as the candidate order parameter itself — the collective predictive order. In our model architecture (14), the relation between the collective predictive order and the familiar spin averages can be made explicit. For the case K = 1, define a particular combination of the spins
Then, with the following definition of an unnormalized weight
we find
To see why only appears here, write the joint distribution as
When inferring , the observed spins are held fixed. Hence is the same factor for every possible : it cannot favor one value of over another. Dividing by to obtain cancels this factor. This is analogous to the cancellation of a constant energy shift in a normalized Boltzmann probability. The still affect and therefore the map .
The physical point is that, for nearly uniform or staggered weights, the discovered collective predictive order is approximately related to the corresponding magnetization through the nonlinear monotonic map in Eq. (18). Eq (18) shows that once the parameters have been learned, the inferred coordinate depends on the many observed spins only through one weighted sum, . Two configurations with the same give the same , and the monotonicity means that preserves the ordering of these weighted sums.
If the learned are uniform, this sum is proportional to the magnetization; if their signs alternate between sublattices with equal magnitude, it is proportional to the staggered magnetization. Thus the weights select which collective spin pattern is represented, while converts its amplitude into the collective predictive order. Whether the selected pattern is a physical order parameter is tested below. The overall sign is arbitrary; for , rotations of the latent axes are also arbitrary. Their scale is fixed by the chosen model convention, not by a thermodynamic normalization.
9/34
3.2. Two criteria for a successful discovery
We judge the learned coordinate by two criteria. First, does it reproduce a known physical order parameter, allowing for the change of coordinates described above? Second, does knowing this coordinate help predict spins that have not been observed? The first criterion identifies the physical meaning of the coordinate; the second tests whether it captures information shared among sites. Both are needed: even in a disordered phase, a coordinate can track magnetization fluctuations without appreciably helping to predict other spins.
To test these criteria on data not used to determine the model, we divide the available configurations into three sets. The training set is used to learn and . The validation set is used to choose among fits obtained with different regularization strengths and, where compared, different latent dimensions K. The test set is used only for the final assessment, after these choices and all parameters have been fixed. The precise splits are given for each example below. Our training uses data with different several temperatures, but supplies neither temperature labels nor coupling constants, lattice coordinates, or known order parameters. Only the site labels identify which observations belong to the same site across configurations.
For the model selection (such as a proper choice of ), we use the validation data set. We ask how much probability a learned model assigns to each validation configuration . Its negative log likelihood (NLL) is , where the probability is obtained by integrating over . A smaller NLL means that the observed configuration is assigned a larger probability, meaning that, for the validation data , a smaller NLL is with a better model. We compare the mean NLL per site,
where V is the validation set, and select the model architecture with the lowest value of this mean NLL. This comparison determines the model to be further tested with the two criteria described.
We assess the first criterion by comparing the coordinate with the known order parameter on test configurations. For the second criterion, we shall perform the following prediction task on the validated model: We show to the model only a randomly chosen set O containing 25% of the sites in each test configuration, and hide the remaining 75%. Using only the revealed spins , we infer a distribution of w and predict a hidden spin :
(19)
We then reveal the hidden spins and evaluate the probability assigned to their actual values. We define the improvement of the NLL as
where the average is over test configurations, random choices of observed sites, and hidden sites. The second term which we introduced as a reference value is made by an independent-site prediction which is defined by using only the frequency of that value at site j in the training data. For example, if spin j is up in half of the training configurations, this
10/34 reference assigns probability 1/2 to up, regardless of the other observed spins. It therefore uses no information shared between sites.
Thus, this (20) is the independent-site prediction NLL minus the CPC prediction NLL: a positive value means that CPC predicts the hidden spins better. We call this quantity the prediction gain below. The reported gain is per hidden site. Unlike the NLL for complete configurations used in model selection, this test measures how much observing some spins helps predict the others. The predictivity lies at the heart of CPC.
3.3. Ferromagnetic and antiferromagnetic order
Consider square lattices with periodic boundary conditions and
where the coupling magnitude and Boltzmann constant are set to unity. For each model, configurations on a lattice were pooled over 13 temperatures from 1.5 to 3.5, whose range includes the known phase transition temperature . At each temperature, 240 configurations were used for learning, 60 for validation, and 200 for testing. We used and 101 quadrature points on to perform integrations. Among , each with three initializations, validation selected for both models. We tried three initializations; one initialization used the leading covariance mode without physical labels , while the other two were random.
Figure 1 resolves the decrease of the regularized free energy into its E and M updates for the selected fits, both of which started from random weights. At fixed parameters, the E-step updates all by the quadrature described above. At fixed , the M-step updates each site's using at most eight Newton iterations, stopping early when the largest absolute parameter increment is below . Starting after the initial E-step, we count one M-step followed by an E-step as one epoch. The runs terminated after 20 epochs for the ferromagnet and 142 for the antiferromagnet, when the relative decrease of the regularized free energy between successive epochs fell below . The final values were and 0.409239, respectively, with training configurations and sites. To resolve the small decreases following the initial rapid drop, the figure shows the difference from the final value on a logarithmic scale. Evaluating after each update, while holding fixed during the M-step, confirms that both E and M updates lower it, up to numerical roundoff.
Figure 2 displays the learned weights. Their normalized absolute overlaps with the uniform and staggered vectors are respectively 0.99913 for the ferromagnet and 0.99916 for the antiferromagnet. Overlaps with the incorrect pattern are below . Hence the same learning rule selects either
The gain is dimensionless, and the conventional name for this logarithmic unit is a “nat.”
For the first initialization, we computed the spin covariance matrix from the training configurations and initialized the weights along its eigenvector with the largest eigenvalue. This direction captures the largest collective fluctuation in the data; no phase labels or known order parameters were supplied.
11/34
(a) Ferromagnet

(b) Antiferromagnet
Fig. 1 E and M updates of the regularized free energy for the selected ferromagnetic (left) and antiferromagnetic (right) cases. The first ten epochs are shown. Blue circles mark individual Newton updates within an M-step; orange diamonds mark the subsequent E-step, with epoch zero denoting the initial E-step. Intermediate Newton updates are spaced evenly within each epoch for display; the horizontal axis is not elapsed time. The vertical axis is the difference from the final recorded free energy, divided by the number of training configurations and sites, on a logarithmic scale. is the value at numerical termination, not an assumed exact minimum.
ferromagnet: learned

antiferromagnet: learned
Fig. 2 Spatial weights learned independently from ferromagnetic (left) and antiferromagnetic (right) configurations. The uniform and staggered patterns are results of learning, rather than constraints.
as the relevant spatial projection, although neither expression was supplied.
Figure 3(a) compares the temperature dependence of the learned coordinate with that of the conventional magnetization ( or ). The solid curves show , while the dashed curves show . Both decrease across the transition region around .
The normalization factors for the solid curves are 2.47493 for the ferromagnet and 2.45642 for the antiferromagnet; the magnetization curves are shown without this rescaling.
12/34
(a) Order-parameter amplitudes

(b) Prediction test
Fig. 3 Temperature dependence and predictive performance of the learned Ising coordinate. (a) Solid curves: mean absolute collective predictive order divided by its value at T = 1.5. Dashed curves: mean absolute magnetization for the ferromagnet (F) and staggered magnetization for the antiferromagnet (AF), without rescaling. The nonlinear maps in Eq. (23) relate the learned coordinate to these conventional order parameters. (b) Prediction gain NLL, Eq. (20), for the hidden 75% of spins given the observed 25%. Positive values indicate a lower prediction NLL than the independent-site reference. Vertical dotted lines mark .
Their shapes differ: the collective predictive order is a nonlinear function of magnetization, as we prescribed before. The nonlinear relation can be estimated explicitly. With the arbitrary sign chosen so that increases with magnetization, the nearly uniform or staggered weights give or , where and , respectively. Fitting the unnormalized against the corresponding gives the following odd-quintic approximations to the rescaled maps in Eq. (18):
(23)
For each model, the coefficients were fitted using 1300 of the 2600 test configurations pooled over all temperatures, and evaluated on the remaining 1300, giving and 0.99392, respectively. Thus the different curve shapes in Fig. 3(a) are consistent with a nonlinear reparametrization of magnetization. These fits describe the already learned coordinates; magnetization was not supplied during CPC training or inference.
We next apply the second criterion of Sec. 3.2. With the learned parameters fixed, we reveal 25% of the sites in each test configuration and predict the remaining 75% using Eq. (19). Relative to the independent-site prediction based on training frequencies, the prediction gain NLL of Eq. (20) is about 0.651 at and 0.28 at for both models. These positive values mean that observing some spins improves the prediction of the others. At which is higher than the phase transition temperature, the gains are only and for the ferromagnet and antiferromagnet, respectively, in nats per hidden spin. Thus the collective predictive order still tracks magnetization fluctuations at high temperature, but provides essentially no predictive improvement over independent sites.
13/34
3.4. Two competing stripe orders
To test whether more than one order parameter can be identified, consider the frustrated square-lattice model
The second sum couples diagonal neighbors. At low temperature, vertical and horizontal stripes compete on the same spins. Their conventional order parameters, used only in evaluation, are
Four ordered sectors lie near and .
We generated configurations by Metropolis sampling with parallel tempering at 13 temperatures from 1.2 to 3.6, using 140/40/80 configurations per temperature for training/validation/test. After 1400 initial sweeps, samples were saved every ten sweeps. Exact lattice symmetries—global spin reversal, rotation, and translation—were randomly applied to reduce sector imbalance. These transformations were not supplied to CPC. We compared with , using respectively 81 points and a quadrature grid on . Validation selected from 1, 10, with two initializations per choice.
We first ask whether the learned weights reproduce the two stripe patterns associated with and in Eq. (25). These patterns are represented by the site-dependent vectors and . For , we would like to see the consistency between the two learned weight vectors and the two components of our learned collective predictive order. Note that they need not coincide with and individually: they may be linear combinations of the two. Recovering both stripe patterns therefore means that suitable linear combinations of the learned vectors can reproduce both and .
To quantify this, let be the matrix whose columns are the learned weight vectors, and let . The matrices
project a spatial pattern onto the space spanned by the learned vectors and onto the space spanned by the two stripe patterns, respectively. We measure their agreement by
Equivalently, is the average fraction of the squared length of each stripe vector retained when projected onto the learned space. It equals one when both stripe patterns can be fully reconstructed, and zero when the learned vectors are orthogonal to both patterns.
We obtain for , showing that the two learned vectors span almost exactly the space of the two stripe patterns. For , we obtain , close to the maximum possible value of for a single learned vector. Thus the model captures one direction within the stripe space, whereas the two-component model captures both independent stripe directions.
Let us proceed for the second criterion. There are two distinct probability comparisons. For complete test configurations, the mean NLL per spin is 0.51631 for K = 1 and 0.38433 for
14/34
Two-component CPC: four stripe sectors

Fig. 4 Collective predictive order (K = 2) inferred from low-temperature stripe configurations at T = 1.2, 1.4, and 1.6. Each point represents one test configuration. The separate four sectors associated with , , , and are observed. Colors identify the conventional stripe sectors after learning; these labels were not supplied to CPC.
, so the two-component model assigns larger probability to the observed configurations on average. Separately, we perform the masked prediction test of Sec. 3.2: 25% of the spins are revealed and the remaining 75% are predicted, with all parameters fixed. At , the reduction in prediction NLL relative to the same independent-site reference is for , compared with 0.4234 for , per hidden spin. The second component therefore improves both the probability assigned to complete test configurations and the prediction of their hidden spins. This concludes that our CPC can find that spins need at least two components of collective predictive order and is favored.
Figure 4 shows the two components of the collective predictive order inferred from test configurations at , 1.4, and 1.6. The four distinguishable groups correspond to the positive and negative sectors of the two stripe orders, identified by color after learning. A polynomial map fitted to part of the test set reconstructs from the learned coordinate with on the remaining configurations.
At high temperature the masked prediction gain becomes negligible or slightly negative: for at means that CPC predicts the hidden spins slightly worse than the independent-site reference. A fixed two-component model is therefore useful for the ordered ensemble, but does not prove that two predictive components remain necessary in the disordered regime.
As a summary, the learned collective predictive order reproduces known existence of multiple order parameters, with their correct structure.
This dimension comparison is within the linear local-field family of Eq. (14); it is not a general impossibility result for scalar nonlinear models.
15/34
3.5. Replica overlap in a spin glass
A spin glass tests a different choice of local observations. We use the fully connected Sherrington–Kirkpatrick (SK) model,
Every pair of spins interacts, irrespective of spatial separation. Thus this infinite-range model has no specified spatial lattice dimension; denotes the number of spins. Two separate parallel-tempering ladders sample replicas with the same and temperature. Each agent now observes the four-state pair , rather than a single spin. The conventional replica overlap is
The choice to supply two replicas is a modeling input; their product and the overlap formula are not supplied to the learning rule.
For scalar w and the same Gaussian , replace the local probabilistic prediction model by an unrestricted four-state distribution,
The regularization in Eq. (15) now also sums over the four states. Neither the parameters at different sites nor the four-state weights are constrained to favor overlap. Data comprise ten replica pairs per at eight temperatures from 0.55 to 2.0. The 44 independently generated coupling realizations are split as 24/8/12 for training/validation/test; hence every test J is unseen during learning. Sampling uses 700 initial sweeps and six sweeps between saved pairs. Independent spin reversals and replica exchange are applied as exact symmetries, with no site permutation. CPC receives neither J nor temperature labels. Integrals use 81 quadrature points on , and validation selects over 10 with two initializations each.
To interpret the result, decompose the learned weights after training:
The common cancels from Eq. (30). Of the summed squared norms of the other three contrasts, 98.55% lies in . Thus the overlap channel is selected by learning.
Figure 5 shows the relation between the learned coordinate and the replica overlap for the test configurations. To quantify this relation, we fit . The coefficients are determined using configurations from the validation set of coupling realizations, where each realization is a separately generated set of random couplings . Keeping these coefficients fixed, we evaluate the map on the test set, whose coupling realizations were used neither for CPC training nor for fitting the polynomial. The fit gives on this test set, showing that the learned coordinate is well described as a nonlinear function of the replica overlap, even for previously unseen coupling realizations.
For the second criterion, we perform the masked prediction test on the 12 test realizations of the random couplings, which were not used for training or model selection. Here the local observation is the pair of spins from the two replicas, with four possible values. We reveal
16/34

Fig. 5 Relation between the replica overlap and the inferred collective predictive order in the fully connected SK model with spins. Each point represents one replica-pair configuration from the test set. The 960 configurations comprise ten samples at each of eight temperatures, , for each of 12 independently generated realizations of the random couplings . The two replicas in each pair share the same couplings. The black curve is the odd-quintic map from to , fitted using the separate validation set of coupling realizations and then held fixed. It gives on the test configurations shown here.
these pairs at 25% of the sites and predict the pairs at the remaining 75%. The independent-site reference uses the training frequencies of the four local states. At T = 0.55, CPC reduces the prediction NLL relative to this reference by per hidden site pair; the gain is also positive for each of the 12 test coupling realizations evaluated separately. Randomly shuffling the sites of the second replica in each test pair removes this predictive improvement.
These calculations demonstrate the recovery of the replica overlap across coupling realizations. More generally, for all three examples the common result is concrete: learning from configuration snapshots let the familiar macroscopic order parameter emerge, and their physical relevance is supported by prediction of observations withheld from inference. Although the examples depend on the chosen local probabilistic prediction model, observation structure, and candidate latent dimensions, our results are encouraging: the macroscopic order emerges through collective predictive coding.
4. Emergent potential
Section 3 showed that the collective predictive order recovers familiar order parameters, up to a nonlinear change of variable. We now ask whether its equilibrium fluctuations also reveal the associated Landau potential. This extends the idea of Sec. 1: after finding a macroscopic variable from spin configurations, we seek the free energy that describes its preferred values and their change with temperature. The free energy landscape should respect hidden symmetry structure, if any, and in this sense, the symmetry can be emergent as the potential emerges.
17/34
We study the ferromagnetic and antiferromagnetic Ising models. The strategy for obtaining the emergent potential is summarized as follows. For each model and lattice size, the parameters of Eq. (14) are learned once from training data configurations collected at several temperatures. The resulting map is then held fixed. Temperature labels then enter at this stage to group the test configurations into thermal ensembles. The frequencies of the inferred coordinates in each ensemble then determine the potential. In the following, we define our emergent potential from CPC, and present our results on the Ising models. Remarkably, Landau-like potentials with phase transition are emergent, from which the Ising critical temperature is read accurately.
4.1. Emergent Landau potential
Here we shall define our potential only from the data configurations and the learned collective predictive order, as follows.
After learning the scalar map of Eq. (13), we apply it to equilibrium spin configurations at each temperature. The inputs at this stage are the learned map, the configurations, and their size and temperature labels. For fixed , let , denote these configurations. Their collective predictive orders and measured distribution are
Thus each configuration contributes one value, and the fraction of values in a given interval estimates the probability of that interval. We use the test configurations of Sec. 3.2, keeping all learned parameters fixed. Grouping the configurations by temperature allows us to follow the thermal evolution of this distribution.
Let denote the underlying equilibrium distribution estimated by Eq. (32). In terms of the equilibrium probability of a configuration, it is
The observed frequencies provide an estimate of this distribution directly.
We define the potential as
This construction uses the relative frequencies of the inferred values. For configurations sampled at thermal equilibrium, is the constrained free energy with its minimum set to zero. Frequently observed values form potential wells and are localized around the bottom of the potential, while rare intermediate values form potential barriers.
The thermodynamic identification follows by writing the equilibrium probability as , with and . The partition sum at fixed collective predictive order is
Hence the free energy is . Equation (34) is therefore . This identity supplies the thermodynamic interpretation; the numerical construction uses the configuration frequencies in Eq. (32).
18/34
This gives the two stages of the construction a direct physical meaning. Minimizing the dimensionless variational free energy of Eq. (3) selects the macroscopic variable . Its equilibrium distribution then determines the constrained Landau potential .
Two notes on the potential follow. First, the definition of the probability distribution Eq. (32) is with a delta-function, thus it is quite spiky and not suited for physical interpretation of the emergent potential. To obtain a smooth estimate from Eq. (32), we replace each delta function by a normalized Gaussian of width :
This is Gaussian kernel density estimation. We determine by leave-one-out likelihood cross-validation. We insert this estimate (36) into Eq. (34). The figures show
Thus the numerical procedure to obtain the emergent potential consists of evaluating the learned map on each test configuration, smoothing the resulting distribution, and taking its negative logarithm relative to the maximum density.
Second, note that the argument of our potential is not the magnetization but the collective predictive order of Sec. 3.1, the latter is a nonlinear transform of the former. Let us look at the difference concerning the coordinates of the potential here. For perfectly uniform or staggered weights, Eq. (18) gives , where is the corresponding magnetization and is the proportionality factor between and . Writing this relation as , a smooth invertible gives
Here C accounts for the separate choices of zero free energy. The Jacobian therefore changes the potential shape and its polynomial coefficients. Even the number of local minima can depend on a nonlinear change of variable. In this paper, we examine the potential as a function of the collective predictive order.
4.2. Emergent potential of Ising models and emergent symmetry
We apply this construction to the square-lattice Ising models of Eq. (21), with periodic boundaries and . Although the configurations and learned parameters are separate from those of Sec. 3.3, the newly learned weights align with the uniform pattern in the
The leave-one-out likelihood cross-validation is a method to find an optimized value for the gaussian replacement. For each trial width, we remove one configuration and estimate the density from the remaining configurations. We evaluate this density at the collective predictive order of the removed configuration and repeat the procedure for every configuration. We choose the width that maximizes the mean logarithm of these densities. This favors a width for which the remaining configurations assign high probability density to the values observed in the removed configurations. We then impose the lower bound to suppress fine structure associated with the numerical integration over .
19/34

Fig. 6 Emergent Landau potentials of the collective predictive order at . Top: ferromagnet; bottom: antiferromagnet. From left to right, the temperatures are , , , and , in units . Gray solid curves show the potentials reconstructed using Eq. (36); colored dotted curves show the quartic fits of Eq. (40). The horizontal axis is , where is defined in Eq. (39), and each reconstructed potential has its minimum set to zero. Fit coefficients are listed in Table 1.
ferromagnetic model and the staggered pattern in the antiferromagnetic model. First here we describe the settings. For each model and each , a scalar CPC model is learned independently from eleven temperatures between 1.5 and 3.5. At each temperature, 70, 20 and 800 configurations are allocated to training, validation and testing. Configurations are collected from sixteen independently initialized Monte Carlo sequences using Wolff cluster updates and are mixed before splitting into the three sets. The spin orientation of each configuration is saved as produced by the Monte Carlo updates. Antiferromagnetic configurations are obtained from ferromagnetic ones by , where . The roles of training, validation, and test data are the same as in Sec. 3.2.
Our results of the emergent potentials are presented in Fig. 6. We use L = 32 to illustrate the reconstruction. The gray solid curves in Fig. 6 show the potentials reconstructed directly from the measured coordinates. This captures the well-known behavior of the Landau potential for magnetization in the Ising models.
It is quite intriguing that in fact the potentials approximately preserve symmetry . We like to remind the readers that we have not told to the model the symmetry of the Hamiltonian. The CPC method automatically reconstructs the Landau potential through the automatically discovered order parameter, and the resultant potentials retain the symmetry.
Furthermore, the tendency of the spontaneous symmetry breaking can be apparently seen in the temperature dependence of the emergent potentials. With the high temperature samples, the reconstructed potential is just a single well, while at low temperature, it has two
20/34 wells. There is a phase transition between them. The two wells near the transition approach the origin on heating and give way to a single well near the origin at T = 2.55.
Here are some detailed notations and numbers used for obtaining the potentials in Fig. 6. For comparisons between models and sizes, we express the horizontal axis in units of the mean low-temperature amplitude,
The sum uses the test configurations at for each model and size. Each plot uses on the horizontal axis, with held fixed throughout the temperature scan. A constant rescaling multiplies the probability density by a constant, which cancels in the ratio defining in Eq. (34).
4.3. Landau coefficients and critical temperature estimate
The reconstructed emergent Landau potential shown in Fig. 6 actually exhibits a phase transition, then can we pin down the critical temperature from the potentials? The exact thermodynamic critical temperature is , while Fig. 6 suggests that the transition temperature is higher than that. In the following, we study the finite-size effect on this model and consider the infinite volume limit to numerically pin-down the value of the critical temperature.
At the reference size L = 32, we describe the change of shape in familiar Landau terms by fitting the measured potentials at each temperature to
The coefficients refer to powers of the ratio used in the figures. Equivalently, the coefficient of is . Here has its minimum set to zero. The least-squares fit uses points with and , avoiding regions where very few configurations are observed. We retain the odd terms to describe the asymmetry of the measured profiles. We report coefficients for : at higher temperatures the observed range of becomes too narrow to constrain the quartic term reliably. Figure 6 also shows representative fits at ; their coefficients are listed in Table 1.
The numerical values in Table 1 show that changes from negative to positive while remains positive at the listed temperatures. This signifies the phase transition described in the emergent Landau potential. To quantify this sign change numerically, we fit the quadratic coefficient over to a straight line,
Here is the fitted slope and is the temperature at which that line reaches zero. We use this definition at every size, and numerically evaluate them to build Table 2.
A standard finite-size estimate of the transition shift is obtained by requiring the correlation length to become comparable to . This suggests a shift proportional
21/34
Table 1 Representative quartic coefficients at , in the coordinate and potential convention of Eqs. (39) and (40). F and AF denote the ferromagnet and antiferromagnet. Digits are rounded to reflect the sampling uncertainty.
| Model | ||||||
|---|---|---|---|---|---|---|
| F | ||||||
| F | ||||||
| F | ||||||
| F | ||||||
| AF | ||||||
| AF | ||||||
| AF | ||||||
| AF |
Table 2 Temperatures at which the fitted quadratic Landau coefficient vanishes. Brackets give the 95% intervals from 300 resamplings of the test configurations.
| Ferromagnet | Antiferromagnet | |||
|---|---|---|---|---|
| 95% interval | 95% interval | |||
| 12 | [2.487, 2.595] | [2.467, 2.565] | ||
| 16 | [2.479, 2.592] | [2.485, 2.633] | ||
| 24 | [2.458, 2.560] | [2.451, 2.521] | ||
| 32 | [2.393, 2.435] | [2.386, 2.431] | ||
| 48 | [2.345, 2.372] | [2.338, 2.358] | ||
| 64 | [2.304, 2.355] | [2.328, 2.353] | ||
to . We test the simplest leading form
where and are fitted constants. Figure 7 compares least-squares fits with equal weight for each size, using either all six sizes or only . The latter reduces the influence of smaller systems and thus is adopted here. Its intercept at gives
Repeating the extrapolation for the resampled data gives 95% intervals [2.203, 2.300] and [2.223, 2.298], respectively. Both contain the exact value .
The physical result is that the collective predictive order found from spin observations supports a Landau description: its measured equilibrium potential develops two wells, which approach a single central well on heating. The temperature extracted from the quadratic coefficient has a finite-size shift whose extrapolation is consistent with the known transition. Together with Sec. 3, this establishes the two steps of the construction: CPC selects
For the two-dimensional Ising model, the known value is , thus this fitting function is rather natural. Instead we could fit numerically from the data too.
22/34

Fig. 7 Finite-size extrapolation of , the temperature at which the linear fit to vanishes. Points show the six system sizes; error bars are 95% intervals from resampling test configurations. Dashed lines fit all six sizes, while solid lines fit only L = 32, 48, 64 using Eq. (42). Squares at 1/L = 0 mark the latter extrapolations. The horizontal dotted line is the exact ....
the macroscopic variable from the mixed-temperature configurations, and it also derives its Landau potentials from fixed-temperature statistics.
5. Agentic communication between atoms
Sections 3 and 4 identified macroscopic order and its potential from spin configurations. Their inference step combined all site observations in a numerical integral, that is, the information of the observation at all the sites is collected and computed for the inference, which is analogous to the existence of a central computer. On the other hand, for example the emergence of language or symbols in human history does not need such a central computer for the inference. Rather, communication between agents, not the centralized communication, can produce the language and symbols as a common variable. In fact, the virtue of CPC is that this kind of decentralized communication can also actually attain sharing of a common emergent variable [6, 8].
Thus here in this section we ask whether a macroscopic order parameter can be learned through communication between individual sites. Each site proposes or evaluates a common variable using its own observed spin, and learns its own parameters from the outcome. This follows the CPC picture of a shared name acquiring meaning through communication, and establishes the Atom-as-an-Agent principle.
The relevant procedure constructed in the scheme of CPC is called Metropolis–Hastings naming game (MHNG), and it provides the basic rule [6, 8]: one agent proposes a name, and another accepts it according to how well it explains that agent's observation. Here the name is a real number w. The acceptance step is familiar from Monte Carlo physics, with a ratio of local observation probabilities playing the role of a Boltzmann-weight ratio. Repeating this communication and acceptance/rejection process many times for the whole community of agents, all the agents can successfully obtain a shared notion. For the case of two agents, the MHNG communication rule has been shown to have the same stationary distribution
23/34
(c1) Accept
(a)
(b)

(c2) Reject
Fig. 8 One communication step of the four-neighbor MHNG. The lower layer shows a fixed observed spin configuration; the upper layer represents values of the single variable shared by all sites. (a) Site k (teal) proposes v from its local conditional distribution, Eq. (45). (b) Its four nearest neighbors (orange) independently compare v with the current value w using Eq. (46); orange links depict these local evaluations. (c1) All four listeners accept (check marks), and the shared state changes from w to v. (c2) At least one listener rejects (cross), and the shared state remains w, as indicated by the loop arrow. Panels (c1) and (c2) are alternative outcomes. Filled circles in the upper layer indicate the current shared value. Both outcomes count as one communication step, after which a new proposing site is chosen. The spin configuration stays fixed throughout.
as centralized inference of the shared variable, with the observations and model parameters held fixed [6, 8].
In this section, we demonstrate that learning through four-neighbor MHNG recovers the same ferromagnetic ordering pattern as centralized CPC in Sec. 3.3.
5.1. A shared variable proposed and tested by individual spins
We first specify how individual sites propose and assess a common explanation of their spin configuration. We use the scalar model of Eq. (14). For configuration , define the probability assigned by site i to its observed spin:
24/34
The two parameters are learned separately at each site. A positive associates a positive common with an increased probability of an up spin; a negative gives the opposite association. Learning these associations gives the common variable its meaning.
Hold one observed configuration and the parameters fixed, and suppress a for the following communication step. The lower layer in Fig. 8 shows the observed spins; the upper layer represents the single shared variable. Starting from its current value w, choose a proposing site k uniformly from all N sites.
Step (a) In Fig. 8 (a), this site k uses its own observation to draw a candidate v from the following normalized distribution at k,
By Bayes' theorem, this is the distribution of the common variable conditioned on that site's spin alone.
Step (b) In Fig. 8(b), each of the four nearest neighbors independently accepts the candidate with probability
A candidate that better explains the listener's spin is always accepted; a less probable explanation is accepted with the indicated probability, that is the Metropolis-Hastings test. All four listeners compare the same current value w with the same candidate v.
Step (c) If all agree, the shared state becomes v, as shown in panel (c1). If any listener rejects, the state remains w, represented by the loop in panel (c2). These panels show alternative outcomes of the same decision. The probability of acceptance, conditional on the speaker, is
Every proposal counts as one communication step, including a rejection, which contributes a repeated current value to the sequence. Local proposals and decisions thus generate successive shared explanations of the configuration, while the observed spins remain fixed.
5.2. Numerical steps for learning
We now construct a learning procedure in which each site adjusts its association with the shared variable, starting from random weights. We use the saved ferromagnetic Ising configurations of Sec. 3.3: , , and thirteen temperatures from 1.5 to 3.5, including . At each temperature there are 240 training, 60 validation, and 200 test configurations, giving , 780, and 2600 configurations in total. The training set combines all
It can be sampled using only local probabilities: draw v from the unit Gaussian and a uniform random number ; keep v if , and repeat the draws otherwise. The retained candidates have density .
The saved configurations were generated by Wolff updates, with 40 initial sweeps and one sweep between saved configurations; a random global spin reversal was applied on saving. A sweep accumulates cluster flips until the number of flipped spins reaches N. The three data sets use different saved indices from the same Monte Carlo sequences. Temporal correlations of these configurations would require a separate statistical assessment.
25/34 temperatures. Learning uses each site's spin observations and the periodic square lattice's nearest-neighbor relations for communication.
Each run starts from independently generated Gaussian numbers , with
Here std is the sample standard deviation, and clip(x, l, u) restricts x to the interval [l, u]. Thus the initial weights have random signs, and each initial bias is set by that site's observed mean spin. Each configuration starts with an independent drawn from the unit Gaussian.
One learning epoch consists of communication followed by parameter updates. For each fixed spin configuration, perform 64 communication steps, then 256 further steps, recording the current shared value w after every 32 steps. This gives samples for each configuration , where labels the recorded values. Each site uses these samples to average over the fluctuations of the shared variable and updates its own parameters to reduce
with the regularization of Eq. (15). The parameter update proceeds as follows. With the communication samples fixed, each site takes four Newton steps to reduce Q with respect to its own parameters . To avoid excessively large changes, each increment is restricted to , and the parameters after the four steps are averaged with their values before the update.
After updating the parameters, communication for each configuration resumes from its last recorded value in the next epoch.
For model selection, we partly use the centralized computation, as follows. We use the same regularization candidates and validation-likelihood criterion as in Sec. 3.3. Here all three initializations for each are random, and each run lasts 60 epochs. For each , we retain the run with the smallest final training objective ; validation likelihood then selects . Note that these selection scores are evaluated by centralized one-dimensional integration over , thus we use centralized computation to choose among the trained models, while the samples used for their parameter updates are generated by MHNG communication.
We next examine the collective predictive order obtained by the MHNG algorithm.
This sum separates into independent two-parameter problems, one at each site. For example, the direction of decreasing Q in is
It compares the observed spin with the site's prediction for the shared value. The corresponding update of uses the same difference, with the factor replaced by one and regularization .
The nonlinear sample averages used in these updates are evaluated using interpolation with grid spacing 0.01.
26/34


Fig. 9 Site weights learned with four-neighbor communication, at initialization and epochs 3, 10, and 60. All panels use the same color scale and the same overall sign convention. Random initial signs evolve into a nearly uniform pattern.
5.3. The order parameter obtained through communication
We test whether the learned common variable represents ferromagnetic order by examining the spatial weights and comparing its inferred value with magnetization on test configurations.
See Figure 9 which shows the evolution of the selected model's weights. Their normalized overlap with the uniform pattern, , increases from 0.01033 to 0.999726. The other eight runs reach overlaps between 0.999708 and 0.999748. After choosing one common overall sign for display, the final weights have mean 0.515033 and spatial standard deviation 0.012052. Thus learning from local decisions recovers a nearly uniform coupling of the shared variable to the spins.
To evaluate the order encoded in the learned local probabilistic prediction models, we hold fixed and infer the shared variable separately at each site. For a new spin configuration , site assigns the proposal distribution of Eq. (45) to . We compute its mean and then average over sites:
27/34
(a)

(b)
Fig. 10 Collective predictive order evaluated by local inference after learning through four-neighbor MHNG. (a) The spatial average of the local proposal means versus magnetization on 2600 test configurations. A common sign is chosen so that the mean learned weight is positive. (b) Temperature dependence of (open circles, solid line) and (squares, dashed line), each normalized by its own value at . Each temperature has 200 test configurations; the two curves almost overlap.
Each local mean uses only that site’s observed spin and learned parameters. The two values are computed once per site using 80-point Gauss–Hermite quadrature. We use as a local readout of collective predictive order, distinguished from the full conditional mean of Eq. (13).
Figure 10 shows that the spatial average of the local inference means closely follows magnetization, with on the 2600 test configurations. Thus the interpretation of this collective predictive order is the magnetization.
This nearly linear relation, as opposed to the results in the previous sections, reflects both the learned weights and the definition of the readout. Since each spin takes only two values, each local mean can be written as
Thus is a weighted sum of spins plus a constant. For uniform weights and zero biases, symmetry gives with a common constant , so that . The learned model is close to this limit.
This readout tests whether the local probabilistic prediction models learned through MHNG have acquired the common ferromagnetic pattern. Its linear form differs from the nonlinear relation obtained by combining all sites' probabilities before taking the conditional mean in Sec. 3.3. The mean absolute values of and also have nearly identical temperature dependence after normalization by their respective values at T = 1.5, as shown in Figure 10. Table 3 lists the unnormalized amplitudes.
These results give the Atom-as-an-Agent principle a concrete realization in a system of spins. Each site proposes or evaluates a shared explanation using its own observation, and learns how that explanation relates to its local state. Starting from random weights, these
28/34
Table 3 Mean absolute local readout and magnetization on test configurations, with 200 configurations at each temperature.
| 1.5 | 0.41602 | 0.98661 |
| 0.29536 | 0.70033 | |
| 3.5 | 0.02678 | 0.06350 |
exchanges produce a common variable that represents ferromagnetic order. The variable is shared across the system, while proposal, acceptance, and parameter updates are assigned to individual sites. In this construction, macroscopic order acquires a predictive meaning through the communication and learning of its microscopic constituents.
6. Conclusion and discussion
In this article, we have formulated the emergence of macroscopic order through collective predictive coding (CPC). Each site behave as an agent, and it describes its observed spin by a local probability distribution conditioned on a variable common to all the agents. Learning these distributions from configurations, in such a way that the common shared variable can predicts the configurations better, determines which collective patterns the common variable represents. In this manner the shared common variable automatically emerges as functions of the configuration through CPC and learning, and they serve as a macroscopic variable well representing the configurations, thus called collective predictive orders.
Our CPC construction recovers magnetization and staggered magnetization in the 2-dimensional classical Ising models, two competing stripe orders, and replica overlap in the fully connected Sherrington-Kirkpatrick model when each site observes a replica pair, as shown in Sec. 3. In particular, the emergence of the order parameters is verified at various levels — the non-necessity of knowing the symmetry structure of the system beforehand, and the automatic detection of the necessary number of the order parameters. For the Ising models, the equilibrium distribution of the collective predictive order yields an emergent Landau potential that evolves from two wells to one on heating. Extrapolating the temperature where its quadratic coefficient vanishes gives transition temperatures consistent with the known exact value (Sec. 4).
We also implemented learning through four-neighboring site communication. Local proposals and acceptance decisions lead from random site weights to a common variable that closely follows magnetization. The learned site weights recover the uniform ferromagnetic pattern also found by centralized CPC in Sec. 3.3, and the spatial average of the local inference means closely tracks magnetization.
In this section we study the recovery of the same physical ordering pattern, but we do not require the four-neighbor communication rule to reproduce the probability distribution of centralized inference. The MHNG for two agents is shown to reproduce the same distribution in [6, 8], while our case generalizes the situation to four-neighboring agents. More concretely, for fixed spin configuration and model parameters, our rule generates a stationary distribution , which generally differs from . For example, if all local likelihoods equal , then , whereas . These are distributions of the inferred shared variable at fixed S. Our numerical result is that learning through four-neighbor communication produces nearly uniform site weights whose local inference means collectively reproduce magnetization.
29/34
The novelty of our CPC application is that we regard each atom as an agent. We allow its capability of inference, prediction and communication. The communication among the microscopic agents to better predict the world lets the macroscopic order emerge collectively. This concludes that the philosophy of “Atom-as-an-Agent” principle actually works quite well in classical spin systems for the emergence of order parameters, Landau potentials, and symmetry and its spontaneous breaking.
Before ending this article, here we argue our novelty concerning the emergence of order parameters by comparing our method to other methods. The emergence of order parameters from microscopic data has been approached from several complementary directions using machine learning (ML) and neural networks. We briefly place the present work in this context, for each of those directions, to discuss the difference and the merits of our AaaA principle.
Mean-field theory. The conventional Weiss mean-field approximation replaces the influence of neighboring spins by a self-consistent average field determined by the microscopic interactions. Our AaaA learns a collective coordinate directly from spin configurations without requiring these interactions (and thus their Hamiltonian) as input, and uses its measured equilibrium distribution to construct an effective potential that reflects the observed collective fluctuations.
ML methods for phase classification and transition detection. Neural networks have been used to classify phases from spin configurations [13] and electronic wave functions [14]. Transitions have also been located through classification performance under varied trial phase labels [15] and through the learned weights of a temperature classifier [16]. Our AaaA learns a shared variable for each configuration without phase or temperature labels, and tests its physical relevance by predicting unobserved spins. This variable also provides a common description that individual sites can develop through local inference and communication. Therefore, our AaaA can be classified as a novel kind of completely unsupervised machine learning which can properly find order parameter and phase transition.
Learning collective coordinates. Principal component analysis (PCA) and variational autoencoders can recover order parameters from spin configurations [17, 18]. Variational autoencoders have also provided coordinates describing chemical ordering in alloys [19] and identified the phase diagram of the anisotropic Ising model [20]. These methods already provide a mapping from each configuration to a collective coordinate. The distinctive emphasis of AaaA is to formulate the inference of this coordinate as the combination of information supplied by individual sites. Each site's local probabilistic prediction model both contributes to inferring the shared variable and predicts its own spin from that variable. This gives the collective coordinate a concrete role in interactions among microscopic agents, and allows its formation to be studied through local proposals, acceptance decisions, and learning.
ML methods for interpretable order parameters. Support vector machines (SVMs) with tensorial kernels have extracted explicit order-parameter tensors and local constraints in frustrated magnets [21], including multiple coexisting and competing orders [22]. An SVM classifier for many-body localization has also been related to a physical measure of wavefunction localization [23]. The distinction from AaaA lies in the principle used to
30/34 identify the order parameter. These SVM approaches extract physical observables from learned rules for distinguishing phases. AaaA learns a shared variable that explains the observations at individual sites, without using phase classification as its learning objective. The resulting variable is identified with physical order through its correspondence with known observables and its ability to predict unobserved spins. Thus, even when the same order parameter is recovered, it emerges as a discriminator between phases in the SVM approaches and as a common explanation of local observations in AaaA.
Coarse graining and effective potentials. Coarse-grained variables have been learned by maximizing the information they retain about distant degrees of freedom [24]. This shares with AaaA the aim of identifying collective variables through their statistical relation to other parts of the system; AaaA additionally gives these variables a role in communication between local agents. Landau free-energy potentials have also been learned from polarization and strain data [25]. In the present construction, the collective coordinate itself is learned from microscopic configurations, and its measured equilibrium distribution then supplies the effective potential.
These approaches offer complementary ways to extract macroscopic physics from microscopic data. The distinctive emphasis of AaaA is to make each microscopic site a participant in forming the collective description: each site learns a local probabilistic prediction model, while a shared variable connects its observations to those of other sites. Our examples show how this construction identifies ordering patterns, supports prediction of unobserved spins, and provides a coordinate for reconstructing an equilibrium free-energy potential. The communication experiment further demonstrates that an ordering pattern can develop through local proposals, acceptance decisions, and learning. This gives concrete form to the Atom-as-an-Agent principle: macroscopic order becomes a shared description that microscopic agents learn to use.
Let us discuss possible more applications of our AaaA principle. First, the examples which we studied in this article is just classical systems, and its application to quantum systems is important in dealing with emergence of macroscopic order, since as described in the introduction the emergence of classical physics out of quantum mechanics is one of the major examples of emergent phenomena in physics. It should be noted that in quantum systems more variety of order parameters can be introduced, such as topological phases. For example, unsupervised learning has classified band topology through continuous deformations connecting Hamiltonians [26] and identified topological phase boundaries from experimental ultracold-atom data [27]. These results extend learning beyond conventional symmetry-breaking order and suggest a direction for AaaA beyond the examples studied here. Such an extension would require identifying observations and local probabilistic prediction models through which the shared variable can represent topological information.
A further direction concerns spacetime emergence in holography, as mentioned in the Introduction. Within a holographic neural-network architecture, bulk metric functions have been learned from boundary response data, including lattice QCD data [28, 29]. These studies motivate asking whether inference and communication among microscopic CPC agents can produce a shared description with a geometric interpretation. This would extend the present approach from the emergence of order parameters toward the emergence of spacetime.
31/34
One of the generalizations of our AaaA protocols is on the architecture of the local communication. In Sec. 5, the four-neighbor experiment uses the lattice adjacency. One can modify this communication rule — how many agents participate in the single communication, and how this communication group is chosen in the learning process. This extension could affect how successfully collective predictive order emerges. For example, if all sites participate in the acceptance decision, the acceptance rate can become very low, making updates of the common variable inefficient. Some other communication architecture can also be suggested from experimental configuration data which often can access only a partial set of sites. It would be interesting to extend our AaaA architecture to the one which reflects the experimental situation.
Finally, let us conclude with a philosophical point of view. Our Atom-as-an-Agent (AaaA) principle may sound odd, as we regard atoms as agents to communicate. However, remember that in these decades the physics principles have been affected by and introduced the viewpoint of information theory. Communication is the most fundamental part of information theory as C. Shannon himself described [30]. Thus it is rather natural that the functions such as agentic communication and agentic inference are assigned to each atom, with which we reconstruct our physical theory on that novel basis. Our AaaA principle is a realization of such philosophy. Interestingly, G. Parisi, in his account of complex systems, describes atoms and spins as interacting elementary agents whose collective behavior emerges from simple individual rules [31]. The AaaA construction pursued here is along Parisi's expression. Each atom contributes its observation, assesses a proposed common variable, and learns how that variable explains its local state. Through the scheme of collective predictive coding, the collective predictive order then acquires meaning as the shared predictive description of these atomic agents. The realization of this AaaA principle, presented in this article, is one of the goals of Machine Learning Physics.
Acknowledgment
The authors thank the members of the Institute of Generative Science, Kyoto University (Preparatory Office), for many valuable discussions. K. H. is grateful to all the members of “Foundation of Machine Learning Physics” project in Japan for developing and exploring together new perspectives in physics through AI. K. H. also like to thank Masayuki Ohzeki for his personal communications.
K. H. was supported in part by JSPS KAKENHI Grant No. JP22H05111 and JP22H05115, and by JST, ARiSE, Japan Grant No. JPMJAR2633. T. T. was supported in part by JSPS KAKENHI Grant Numbers JP23H04835. We also acknowledge the use of artificial intelligence tools for their assistance in coding and manuscript preparation.
References
[1] K. Morita, Sōhatsu to Butsuri: Mikuro to Makuro o Tsunagu Tetsugaku (Nagoya University Press, Nagoya, 2024), in Japanese. ISBN: 978-4-8158-1175-4.
[2] J. M. Maldacena, “The Large N limit of superconformal field theories and supergravity,” Int. J. Theor. Phys. 38 (1999), 1113-1133 doi:10.1023/A:1026654312961 [arXiv:hep-th/9711200 [hep-th]].
[3] S. S. Gubser, I. R. Klebanov and A. M. Polyakov, “Gauge theory correlators from noncritical string theory,” Phys. Lett. B 428 (1998), 105-114 doi:10.1016/S0370-2693(98)00377-3 [arXiv:hep-th/9802109 [hep-th]].
[4] E. Witten, “Anti-de Sitter space and holography,” Adv. Theor. Math. Phys. 2 (1998), 253-291 doi:10.4310/ATMP.1998.v2.n2.a2 [arXiv:hep-th/9802150 [hep-th]].
32/34
[5] T. Taniguchi, “Collective predictive coding hypothesis: symbol emergence as decentralized Bayesian inference,” Front. Robot. AI 11 (2024), 1353870. doi:10.3389/frobt.2024.1353870.
[6] T. Taniguchi, Y. Yoshida, Y. Matsui, N. Le Hoang, A. Taniguchi and Y. Hagiwara, “Emergent communication through Metropolis-Hastings naming game with deep generative models,” Adv. Robot. 37 (2023), 1266–1282. doi:10.1080/01691864.2023.2260856.
[7] T. Taniguchi (ed.), Symbol Emergence Systems: An Interdisciplinary Discussion about Cognition, Language and Society (Springer, Singapore, 2026). doi:10.1007/978-981-95-1327-7.
[8] J. Inukai, T. Taniguchi, A. Taniguchi and Y. Hagiwara, “Recursive Metropolis-Hastings naming game: symbol emergence in a multi-agent system based on probabilistic generative models,” Front. Artif. Intell. 6 (2023), 1229127. doi:10.3389/frai.2023.1229127.
[9] T. Taniguchi, S. Takagi, J. Otsuka, Y. Hayashi and H. T. Hamada, “Collective predictive coding as model of science: formalizing scientific activities towards generative science,” R. Soc. Open Sci. 12 (2025), 241678. doi:10.1098/rsos.241678.
[10] K. Friston, “A theory of cortical responses,” Philos. Trans. R. Soc. B 360 (2005), 815–836. doi:10.1098/rstb.2005.1622.
[11] K. Friston, “The free-energy principle: a unified brain theory?” Nat. Rev. Neurosci. 11 (2010), 127–138. doi:10.1038/nrn2787.
[12] T. Taniguchi, Y. Hirai, M. Suzuki, S. Murata, T. Horii and K. Tanaka, “System 0/1/2/3: Quad-Process Theory for Multitimescale Embodied Collective Cognitive Systems,” Artif. Life 31 (2025), 465–496. doi:10.1162/ARTL.a.12.
[13] J. Carrasquilla and R. G. Melko, “Machine learning phases of matter,” Nature Phys. 13 (2017), 431–434. doi:10.1038/nphys4035.
[14] T. Ohtsuki and T. Ohtsuki, “Deep Learning the Quantum Phase Transitions in Random Two-Dimensional Electron Systems,” J. Phys. Soc. Jpn. 85 (2016), 123706. doi:10.7566/JPSJ.85.123706.
[15] E. P. L. van Nieuwenburg, Y.-H. Liu, and S. D. Huber, “Learning phase transitions by confusion,” Nature Phys. 13 (2017), 435–439. doi:10.1038/nphys4037.
[16] A. Tanaka and A. Tomiya, “Detection of Phase Transition via Convolutional Neural Networks,” J. Phys. Soc. Jpn. 86 (2017), 063001. doi:10.7566/JPSJ.86.063001.
[17] L. Wang, “Discovering phase transitions with unsupervised learning,” Phys. Rev. B 94 (2016), 195105. doi:10.1103/PhysRevB.94.195105. [arXiv:1606.00318 [cond-mat.stat-mech]].
[18] S. J. Wetzel, “Unsupervised learning of phase transitions: From principal component analysis to variational autoencoders,” Phys. Rev. E 96 (2017), 022140. doi:10.1103/PhysRevE.96.022140. [arXiv:1703.02435 [cond-mat.stat-mech]].
[19] J. Yin, Z. Pei, and M. C. Gao, “Neural network-based order parameter for phase transitions and its applications in high-entropy alloys,” Nature Comput. Sci. 1 (2021), 686–693. doi:10.1038/s43588-021-00139-3.
[20] A. Baul, N. Walker, J. Moreno, and K.-M. Tam, “Application of the variational autoencoder to detect the critical points of the anisotropic Ising model,” Phys. Rev. E 107 (2023), 045301. doi:10.1103/PhysRevE.107.045301.
[21] J. Greitemann, K. Liu, L. D. C. Jaubert, H. Yan, N. Shannon, and L. Pollet, “Identification of emergent constraints and hidden order in frustrated magnets using tensorial kernel methods of machine learning,” Phys. Rev. B 100 (2019), 174408. doi:10.1103/PhysRevB.100.174408.
[22] K. Liu, J. Greitemann, and L. Pollet, “Learning multiple order parameters with interpretable machines,” Phys. Rev. B 99 (2019), 104410. doi:10.1103/PhysRevB.99.104410.
[23] W. Zhang, L. Wang, and Z. Wang, “Interpretable machine learning study of the many-body localization transition in disordered quantum Ising spin chains,” Phys. Rev. B 99 (2019), 054208. doi:10.1103/PhysRevB.99.054208.
[24] M. Koch-Janusz and Z. Ringel, “Mutual information, neural networks and the renormalization group,” Nature Phys. 14 (2018), 578–582. doi:10.1038/s41567-018-0081-4.
[25] M. Pulzone, N. S. Fedorova, H. Aramberri, and J. Íñiguez-González, “Machine learning Landau free-energy potentials for third-principles simulations,” Phys. Rev. B 112 (2025), 224113. doi:10.1103/9ph9-ry5x.
[26] M. S. Scheurer and R.-J. Slager, “Unsupervised Machine Learning and Band Topology,” Phys. Rev. Lett. 124 (2020), 226401. doi:10.1103/PhysRevLett.124.226401.
[27] N. Käming, A. Dawid, K. Kottmann, M. Lewenstein, K. Sengstock, A. Dauphin, and C. Weitenberg, “Unsupervised machine learning of topological phase transitions from experimental data,” Mach. Learn.: Sci. Technol. 2 (2021), 035037. doi:10.1088/2632-2153/abffe7.
[28] K. Hashimoto, S. Sugishita, A. Tanaka and A. Tomiya, “Deep learning and the AdS/CFT correspondence,” Phys. Rev. D 98 (2018), 046019. doi:10.1103/PhysRevD.98.046019. [arXiv:1802.08313 [hep-th]].
[29] K. Hashimoto, S. Sugishita, A. Tanaka and A. Tomiya, "Deep learning and holographic QCD," Phys.
33/34
Rev. D 98 (2018), 106014. doi:10.1103/PhysRevD.98.106014. [arXiv:1809.10536 [hep-th]].
[30] C. E. Shannon, “A Mathematical Theory of Communication,” Bell Syst. Tech. J. 27 (1948), 379–423 and 623–656. Online reprint: https://spinchange.com/the-mathematical-theory-of-communication/ (accessed October 24, 2026).
[31] G. Parisi, In a Flight of Starlings: The Wonders of Complex Systems, translated by S. Carnell (Penguin Press, New York, 2023).
34/34