Nonequilibrium Thermodynamics of the Majority Vote Model

The majority vote model is one of the simplest opinion systems yielding distinct phase transitions and has garnered significant interest in recent years. This model, as well as many other stochastic lattice models, are formulated in terms of stochastic rules with no connection to thermodynamics, precluding the achievement of quantities such as power and heat, as well as their behaviors at phase transition regimes. Here, we circumvent this limitation by introducing the idea of a distinct and well-defined thermal reservoir associated to each local configuration. Thermodynamic properties are derived for a generic majority vote model, irrespective of its neighborhood and lattice topology. The behavior of energy/heat fluxes at phase transitions, whether continuous or discontinuous, in regular and complex topologies, is investigated in detail. Unraveling the contribution of each local configuration explains the nature of the phase diagram and reveals how dissipation arises from the dynamics.


I. INTRODUCTION
Opinion dynamics is a crucial issue in sociophysics, encompassing several topics, such as complex social processes, populational dynamics, decision making, elections and spreading of fake news/rumors and others [1].In recent years, distinct approaches have been proposed and investigated, aimed at tackling the key aspects of opinion dynamics.Several of them deal with systems presenting phase transitions, marking the existence of two regimes, one of which has a prevailing given opinion.
Among the distinct opinion systems, the majority vote (MV) model is highlighted by its simplicity and for exhibiting universal features of nonequilibrium phase transitions.Its interaction mechanism is comprised of the agent's tendency to align (follow) its opinion based on the majority opinion of its nearest neighborhood [2][3][4].Subsequently, generalizations of the MV model have aroused interest, taking into account the influence of network topology [3,4], the inclusion of distinct noises [5,6], more states per agents [7,8] and more recently, inertial effects [8][9][10].In the latter, the presence of inertial terms have revealed a robust mechanism, affecting the classification of phase transitions even for distinct lattice topologies [10] and in systems subject to temporal disorder [11].More recently, the main properties of the MV have been extensively studied in terms of entropy production signatures [12,13].
Stochastic thermodynamics [14][15][16][17] has become one of the most important topics in the realm of nonequilibrium statistical mechanics and an appropriate framework for describing the thermodynamic properties of Markovian nonequilibrium systems, having as a starting point a suitable definition of production of entropy which is able to discern equilibrium from nonequilibrium systems [18].Despite previous works investigating the main properties of the MV through the entropy production [12,13], a fundamental point of the MV and allied voter models comprises a consistent thermodynamic formulation able to link the entropy production with the fundamental concepts of heat (heat flux) and temperature.Aimed at overcoming such drawback, recently, a thermodynamic description for opinion models has been proposed [19], in which the idea of a distinct heat bath per neighborhood opinion configuration was introduced.Such a framework not only allows associating the dynamics to well-defined temperatures but also reconciles the relationship between entropy production and heat flux.
In this paper, we advance on the aforementioned idea, by thoroughly investigating the thermodynamics of the majority vote model.More concretely, a general and unambiguous temperature definition is derived, providing a way to properly investigate the behavior of entropy production and heat fluxes in distinct phases as well as at continuous and discontinuous transition regimes.The investigation is also aimed at understanding the roles of inertia and distinct topologies (regular and complex).Given that the number of reservoirs and heat fluxes increases with the connectivity, the analysis of their roles and which of them is more representative of entropy production will be addressed and, finally, used to probe its traits across phase transitions.This paper is organized as follows: Sec.II introduces the model and its main properties, model thermodynamics will be presented in Sec.III, and conclusions are drawn in Sec.IV.

II. MAJORITY VOTE MODEL AND PHASE TRANSITION BEHAVIOR
In this section, we present an overview of the majority vote model and its phase transition aspects.It consists of a simple system with Z 2 "up-down" symmetry, in which each microscopic configuration η is set by the collection of N individuals η ≡ (η 1 , η 2 , ..., η i , ..., η N ), with η i being the spin variable of site i which takes the values ±1 according to whether the spin is "up" or "down".With probability 1 − f , the spin η i tends to align itself with its local neighborhood majority.Conversely, with complementary probability f , the majority rule is not followed.The inertial version differs from the original one by the inclusion of a term proportional to the local spin competing with the neighborhood.The model dynamics are governed by the following master equation where w i (η) comprises the transition rate at which each site i changes its opinion from η i to −η i , given by where X = (1 − θ) + kθη i , k is the connectivity of a site, θ is the inertia strength, and sgn(X) is the sign function.The term plays a key role in the following results, it is defined as the sum of a site's neighboring spins, j η j , and we omit the dependence on η for convenience.At a given configuration, all sites with will become thermodynamically equivalent, defining a thermal bath.The system presents two ferromagnetic phases for small f .Upon raising f , the system yields an order-disorder phase transition, where the value of the critical point is dependent on the lattice topology and neighborhood [2,3].While phase transitions are always continuous for the original model (θ = 0) [4], the inclusion of inertia can shift the phase transition from continuous to discontinuous depending on the lattice topology and the neighborhood [8][9][10].
Since Eq. ( 2) states that the transition rate depends on the sign of X, the flip probability (whether 1 − f or f ) will depend on the interplay between the number of nearest neighbors k and θ.For example, for η i = −1, the argument of sgn(X) reads − θ(k + ) implying that the transition −1 → +1, due to a neighborhood with /(k+ ) > θ, occurs with probability 1− f (similar to the inertialess case), whereas when /(k + ) < θ the probability is f .Thus, we define * −kθη i /(1 − θ) as the threshold value splitting the neighborhoods: All values | | > | * | yield a transition rate equals to the inertialess case, while | | < | * | yield w i (η) = f regardless of η i .For completeness, the transition rate is 1/2 when both values are the same.
For fixed k, as in the present case, the phase diagram θ versus f will be characterized by plateaus.If θ is increased, the plateaus emerge when * has an even integer value, since it marks a regime where one additional neighborhood type shifts its contribution f ↔ 1 − f .The plateaus can be obtained by relation For instance, when the connectivity is k = 20, these values are which are later verified in the phase diagrams obtained by simulations in Figs. 2 and 3.They are the same for both regular and random-regular topologies, although the classification of the phase transition is also influenced by the topology, demonstrating that the mechanism behind the appearance of such plateaus is related to sharp shifts of contribution of each neighborhood .

A. Entropy production
The entropy production and its connection with the heat flux is the central issue of this paper.Before relating both of them, we first review the main features about the microscopic entropy production formula.Starting with the entropy definition S = − ln P(η) (here and hereafter, we adopt the convention k B = 1 for the Boltzmann constant) and assuming the system in contact with a (or multiple) reservoir(s), its time derivative dS /dt is the difference between two terms: dS /dt = Π − σ, where Π and σ are the entropy production and entropy flux rates, given by the generic expressions: and where the one-site dynamics assumption was used.Since dS /dt = 0 in the nonequilibrium steady-state (NESS), in which P(η, t) → p st (η), the steady entropy production can be calculated from σ, acquiring the convenient ensemble average form [13]: In order to evaluate σ from Eq. ( 7) we take the ratio between w i (η) and its reverse w i (η i ) given by Inspection of the ratio above reveals that only local configurations where | | > | * | will contribute to the entropy production.When | | < | * |, the ratio vanishes and therefore these configurations yield reversible transitions.This property is illustrated in Fig. 1, where values of * are shown in terms of θ.For a given finite k, the even values of locate the plateaus in the figure.For kθ/(1 − θ), Eq. ( 8) is conveniently rewritten as where H(•) is the Heaviside function.However, for = kθ/(1 − θ), marking the plateau position, Eq. ( 9) acquires a distinct value given by ln Above formulae are equivalent by calculating such a ratio only over the subspace of local configurations in which the ratio is different from 1, that is for ≥ kθ/(1 − θ) [13].Thus, when expressed in terms of the misalignment parameter f , the steady entropy production σ is given by

B. Overview about phase transitions and finite-size scaling
As stated broadly in the literature, continuous and discontinuous phase transitions become rounded at the vicinity of phase transitions due to finite size effects, whether for equilibrium [20] and nonequilibrium systems [21,22].Despite the order parameter and its moments have been broadly exploited for characterizing nonequilibrium phase transitions, recently, the behavior of entropy production and allied quantities (e.g. its first derivative) has attracted a great deal of attention as their identificators [12,13,[23][24][25][26].
According to the finite-size scaling (FSS) theory, at the vicinity of the critical point f c , a given quantity X [X ∈ (|m|, χ and σ ≡ dσ/d f )] will behave as X = N y x /ν f x (N 1/ν | |), where f x is a scaling function, = ( f − f c )/ f c is the distance to the criticality and y x is the critical exponent obtained from (y x = −β, γ and α) [20].The last exponent is similar to the relationship between the thermal derivative of the entropy, S , and specific heat, C, in equilibrium phase transitions (recall- [20], illustrating that the connection between entropy production and exchanged heat presented here introduces a physical argument for such scaling behavior. Since the scaling behavior of heat fluxes (and their derivatives) at the criticality was considered previously in [19] we are going to focus on nonequilibrium discontinuous phase transitions in this paper.For a generic ensemble average X, the starting point consists of assuming a bimodal Gaussian distribution, centered at µ o and µ d (with associated variances χ o and χ d ).In the case of the steady entropy production at the vicinity of = f − f c , a bimodal entropy production probability distribution centered at µ o and µ d (with associate variances χ d and χ o ) leads to the approximate expression for σ: where α = χ d /χ o .We note that the ordered and disordered phases are favored as < 0 and > 0 (assuming that µ o < µ d ), respectively, and σ = (µ o + αµ d )/(1 + α) at = 0, indicating that all entropy production curves, simulated for distinct N's, will cross at the transition point f c .Having σ, its derivative in respect to f behaves at the vicinity of f c as: showing that σ scales with N at the coexistence = 0, in agreement with the above finite size expression for the quantity X. Alternatively (and analogously), Eq. ( 11) is obtained by resorting to the ideas presented in [27][28][29], where coexisting phases are treated via a two-state model in which ordered and disordered phases are given by transition rates exhibiting an exponential dependence on the system size N and proportionality to the distance to the transition point: where k, c 0 , c a , c b > 0 are constants."Ordered" and "disordered" probabilities, p and q respectively, are related to rates a and b by means of relations p = b/(a+b) and q = 1−p, given by p As shown in Ref. [28], a given ensemble average (including the entropy production σ = σ τ /τ averaged over a sufficiently long time t → ∞ and over many independent stochastic trajectories has its average given by σ = µ a p + µ b b, where which has precisely the form of Eq. (11).
The main features of discontinuous phase transitions are summarized in Fig. 2. From now on we shall consider k = 20 which exhibits a discontinuous phase transition for θ > 1/3, as depicted in panel Fig. 2(a).Aforementioned portraits are exemplified in panels (b) − (d) for θ = 3/8.We remark that continuous lines, given by Eq. ( 11), describe very well the behavior of the entropy production and its derivative, the latter presenting a maximum at f * c scaling with N −1 , whose value as N → ∞ agrees very well with those obtained from the crossing among curves.

C. Discontinuous phase transitions in complex topologies
The behavior of discontinuous phase transitions in complex topologies is more revealing and it is different for small and large system sizes.In the former case, quantities change smoothly as f is varied (see e.g.Fig. 3(c)), in similarity with the behavior in regular structures, also characterized by the reduced cumulant U 4 presenting a minimum value increasing with N (inset) and a maximum behavior of χ near the coexistence.Conversely, the behavior becomes akin to the meanfield when N is large, in which the phase coexistence manifests itself by means of a hysteretic branch, e.g. a region located at f b < f < f c when the dynamics evolve to the ordered (stable for f ≤ f b ) and disordered (stable for f ≥ f c ) phases depending on the initial condition.Such changes upon raising N share some similarities with the metastable behavior observed in the dynamics and thermodynamics of work-to-work transducers, where the system behavior "quickly" approaches the MFT's [behavior] as N increases [30].
Here, we describe a brief (non-rigorous) argument about the expected behavior in complex topologies by resorting to the ideas from Ref. [13].Since spins are independent of each other in the disordered phase, the order parameter behaves as η i ∼ N −1/2 and then a n−th correlation will behave as η i η i+1 ...η i+n ≈ η i η i+1 ... η i+n = N −n/2 .Hence, in the thermodynamic limit, all correlations will vanish and σ will depend solely on control parameters.On the other hand, η i η i+1 ...η i+n is expected to be finite and also f − dependent in the ordered phase, consistent with σ exhibiting a dependence on the control parameters and correlations.Therefore, the existence of a hysteretic loop for the order parameter (panel (b)) is also translated to the entropy production behavior (see e.g.panel (d)).show, for θ = 3/8, the order parameter |m| versus f for distinct large and small system sizes N, respectively.Inset: the reduced cumulant U 4 versus f .Circles and × attempt to the forward and backward "trajectories", respectively.In (d), its corresponding σ's for N = 5000.

III. THERMODYNAMICS OF THE MAJORITY VOTE MODEL A. General features
In Sec.II, the main properties of the majority vote model were analyzed without any thermodynamics consideration.In this section, we address this issue in detail.The central point consists of assuming that the one-site transition rate w i (η) is decomposed in distinct (mutually exclusive) components, each one associated with a given thermal bath (reciprocal inverse temperature β ), given by w i (η) = w i (η) ( = 2, 4, ..., k), where w i (η) assumes the Glauber form: where α is a constant and ∆E = E(η i ) − E(η) denotes the energy difference between configurations η and η i .For "up-down" Z 2 symmetry systems, the energy can be generically expressed according to the Ising-like form E(η) = −J (i, j) η i η j − H N i=1 η i [31], where J represents the interaction energy between spins, and H is a parameter accounting for the dependence on the local spin η i (usually the magnetic field).Giving that sgn( ) = −sgn(− ), one has H = 0 for all values of θ.From Eq. ( 15), the ratio w i (η i )/w i (η) is then expressed according to the local detailed balance: We are now in a position to obtain the model's thermodynamic properties.The time variation of the mean energy is given by dU/dt = Φ , where Φ denotes the heat exchanged due to the -th thermal bath, given by constrained by the first law of thermodynamics, Φ = 0 in the NESS.The entropy production and entropy flux are also decomposed into -indexed components by replacing w i (η) → w i (η) in Eqs. ( 5) and (6).In particular, the latter reads Since the entropy change vanishes at the NESS, dS /dt = (Π − σ ), both entropy production and entropy flux can be identified by Eq. ( 18): Π = Π = σ = σ.The expressions above are consistent with Refs.[16,32].
Finally, by inserting Eq. ( 16) into Eq.( 18), each entropy flux component σ is related with exchanged heat Φ by a Clausius-like form σ = −β Φ , where Φ is given by Eq. ( 17).Alternatively, σ can also be written in the usual thermodynamics form as a sum of thermodynamic fluxes times forces: where the second temperature was set as a reference to define all (k/2) − 1 thermodynamic forces X ≡ β 2 − β , associated with its respective flux, Φ .For simplicity, we set the Ising interaction parameter to J = 1.From the expression for E(η), it follows that ∆E = 2η i , which can be rewritten as ∆E = 2η i | |sgn( ).By taking the logarithm of Eq. ( 16), it follows that ln w i (η) Since the transition rates associated with each thermal bath are mutually exclusive, a direct comparison with Eq. ( 9) for a given provides to obtain each (reciprocal inverse) temperature β given by where β 2 = 2β 4 = 3β 6 ... = kβ k /2 in the inertialess case.We pause to make a few comments.First, Eq. ( 21) is one of the main results of this paper, it extends the calculation of temperatures for a given neighborhood and inertia, and reduces to the expression from Ref. [19] as θ = 0. Second, β vanishes for large enough values of inertia θ > θ p , illustrating that despite a heat flux associated with the -th reservoir being well-defined, it does not produce entropy.Third and last, the temperature assumes a different value for θ = θ p given by This completes our description of the temperature definitions for the MV as well as the influence of inertia.Now we turn to unravel the role of each to the fluxes of heat and entropy production.Starting with the inertialess case, where β 2 > β 4 > ... > β k , we argue that the heat fluxes associated with the states in contact with the coldest and hottest baths are always positive and negative, respectively: Φ 2 < 0 and Φ k > 0, whose a (non-rigorous) argument is present as follows.Starting with the two thermal baths case (k = 4), it is straightforward to verify that, since σ acquires the simple form σ = (β 2 −β 4 )Φ 4 > 0. Given that β 2 −β 4 > 0 [cf.Eq. ( 21)], it follows that Φ 4 ≥ 0 and hence Φ 2 = −Φ 4 ≤ 0. The case of more than two reservoirs is more intriguing, since intermediate fluxes can be positive, negative, or even change their sign upon f being varied [see e.g.Fig. 5 (d)].For k = 6, one has σ = −(β 2 − β 6 )Φ 2 − (β 4 − β 6 )Φ 4 ≥ 0 and three possibilities for Φ 2 and Φ 4 .The former, in which both are negative, promptly implies σ ≥ 0, whereas the second case, Φ 2 ≤ 0 and ).The third possibility, in which Φ 2 ≥ 0 and Φ 4 ≤ 0 violates the second law in some cases and thus it is not possible.Similar findings are verified for θ 0, but we should note that only neighborhoods with * greater than − kθ/(1 − θ) will contribute to the entropy production, σ = − k * β Φ .For example, for k = 20 and distinct inertia intervals 3/8 < θ ≤ 7/17, 7/17 < θ ≤ 4/9, θ > 4/9, the corresponding entropy productions read such latter one similar to the k = 4 case (but here k =2 Φ = 0) and once again illustrating that Φ * =18 ≤ 0 and Φ k=20 ≥ 0. We close this section by pointing out that, despite the above nonrigorous argument, the general finding Φ * ≤ 0 and Φ k ≥ 0 has been verified in all cases.In contrast, it is not possible to draw general conclusions about intermediate fluxes, in which some change sign as f increases.

B. Fluctuation theorems
Thermodynamic consistent systems satisfy the detailed fluctuation theorem (DFT) for entropy production, which gives rise to the stochastic version of the second law.It states that negative fluctuations of the integrated entropy production are exponentially suppressed by the positive counterparts.For a given integration window τ, the DFT is asymptotically valid for Σ = τ 0 σ(t)dt at the NESS since it is equal to the entropy production: where P τ (Σ) represents the probability of measuring Σ in a trajectory of length τ.This relation holds beyond the longtime limit when the internal change of configuration entropy is considered in addition to the entropy fluxes.Consequence of the above, the integral fluctuation theorem (IFT) reads and is useful for relating the components of Σ, such as in the celebrated Jarzynski equality [33] that relates the statistics of work to free energy differences, bridging equilibrium and nonequilibrium quantities.The feasibility of employing such methods is tightly related to the ability to observe fluctuations in the trajectories, which become rare as τ increases.
We explore the manifestation of these relations, cornerstones of stochastic thermodynamics, in the MV vote model.The left panel of Fig. 4 shows the convergence of the lefthand side of Eq. ( 23) to its right-hand side as the integration windows get larger for the entropy production evaluated from Eqs. ( 18) and (19).Observing the DFT becomes an expensive task even for small systems since the negative fluctuations of entropy production become increasingly rare for larger values of τ.The right panel shows the left-hand side of the IFT in Eq. (24), which converges to one despite the presence of inertia.It is worth mentioning that the convergence is observed from above and from below.Although no general conclusion can be drawn, the behavior of these fluctuation relations might be related to the phase transitions: In the examples, the IFT presents a slower convergence at the vicinity of the phase transition.

C. Heat fluxes at phase transitions
According to Eq. ( 17), every heat flux Φ is an ensemble average and, therefore, we expect at least the most significant components of the entropy production to behave similarly to σ at the vicinity of a phase transition.More specifically, at discontinuous phase transitions, the curves of entropy production cross at f c for distinct system sizes in regular lattices, and a hysteretic branch is present in complex topologies [13].These properties are promptly verified for the largest fluxes = 12, 14 and 20.For a regular lattice, panels (a)-(c) of Fig. 5  agreement with the simulation results.Remarkably, for both regular and complex topologies, the phase transition can be probed and precisely located from the behavior of any individual flux.

D. Contributions to dissipation
Inspecting the thermodynamic contribution of individual 's raises the question of how each type of neighborhood contributes to entropy production, a measure of dissipation.As Figure 7 compares, for the random-regular and regular lattices, σ * ,k and σ for distinct values of θ.In all cases, σ * ,k is not only close to σ but also captures the qualitative behavior, successfully describing the interplay between the control parameter f , inertia θ, and the dissipation, including a peak located at the vicinity of the phase transition.For larger θ the set of dissipating local configurations shrinks, hence the better agreement between both curves.

IV. CONCLUSION
The nonequilibrium thermodynamic theory of the generic majority vote model was presented and thoroughly investigated, encompassing its phase transition.A consistent definition of temperature and the connection between heat fluxes and entropy production were introduced and analyzed in the context of continuous and discontinuous phase transitions.The present approach for fluxes is thermodynamically consistent and equivalent to the microscopic entropy production definition and satisfies the detailed fluctuation theorem.
We believe that the present framework not only conciliates the thermodynamic aspects of an important class of nonequilibrium systems but also introduces a new kind of nonequilibrium ingredient, based on the idea of a thermal bath associated with the system neighborhood.Such an idea has revealed general for a generic voter-like model with "up-down" Z 2 symmetry.In the presence of inertia, the spin changes induced by some local configurations are reversible.Moreover, we explore what are the most relevant neighborhoods driving the system dissipation, including its qualitative features across a phase transition, and how these neighborhoods contribute to the structure of the phase diagram.
Our findings are valid for a class that describes systems from social dynamics to the physics of thermal engines, presenting collective effects that can be leveraged for improved performance.Such potential application raises interesting questions such as the role of lattice topology and even the kind of voter model used (see e.g.Ref. [19] for a comparison between them) in order to optimize the desirable power and efficiency.Such topics should be investigated in the future.

FIG. 1 .
FIG. 1. Scheme representing the values of * for η i = ±1 corresponding to the plateaus.In the shaded area, where | | < | * |, the neighborhoods do not contribute to the entropy production.

FIG. 2 .
FIG. 2. In (a), the phase diagram of the inertial majority model for a regular lattice for k = 20.Vertical lines mark the plateau positions predicted in Eq. (3).Panel (b) depicts the entropy production σ for distinct system sizes N = L 2 's.Continuous lines denote the phenomenological description from Eq. (11) and vertical line corresponds to the crossing among entropy production curves at f c = 0.05085(2).In (c), the derivative σ ≡ dσ/d f versus f obtained from continuous lines in (b).Panel (d) show the position f * c of maximum of σ versus N −1 and its accordance with the crossing among entropy production curves yielding (symbol •) as N → ∞.

FIG. 3 .
FIG. 3. Phase transition for the MV in a random-regular topology with connectivity k = 20.Panel (a) depicts the phase diagram θ versus f .Continuous and dashed lines show, for a system of size N = 10 4 .Note that a hysteretic branch for θ > 3/13.Panels (b) and (c)show, for θ = 3/8, the order parameter |m| versus f for distinct large and small system sizes N, respectively.Inset: the reduced cumulant U 4 versus f .Circles and × attempt to the forward and backward "trajectories", respectively.In (d), its corresponding σ's for N = 5000.

FIG. 4 .
FIG. 4. Left: Convergence to the detailed fluctuation theorem as integration window τ increases for a lattice L = 6 and f = 0.04; solid lines are simulation results while dashed lines are the respective linear fits.Right: Convergence to the integral fluctuation theorem for the case with no inertia (blue) and with inertia θ = 3/8 (green); additional parameters are k = 20 and N = 10 4 .