Stochastic entropy production in the quiet Sun magnetic fields

The second law of thermodynamics imposes an increase of macroscopic entropy with time in an isolated system. Microscopically, however, the entropy production can be negative for a single, microscopic realization of a thermodynamic process. The so-called fluctuation theorems provide exact relations between the stochastic entropy consumption and generation. Here, we analyse pixel-to-pixel fluctuations in time of small-scale magnetic fields (SSMF) in the quiet Sun observed with the SDO/HMI instrument. We demonstrate that entropy generated by SSMF obeys the fluctuation theorems. In particular, the SSMF entropy consumption probability is exactly exponentially smaller than the SSMF entropy generation probability. This may have fundamental implications for the magnetic energy budget of the Sun.


INTRODUCTION
Studying spatial and temporal dynamics of small-scale magnetic fields (SSMF) on the solar surface is important for system-wide understanding of the solar magnetism and its role in heating the solar outer atmosphere. A widely used approach to study evolution of SSMF is based on feature tracking. As summarized by DeForest et al. (2007) and Lamb et al. (2013), this approach has significant limitations and subjective biases because of (1) a finite spatial and temporal resolution of observations, and (2) ambiguous boundaries and interactions of SSMF, which are not discrete objects.
In this Letter, we employ a novel formalism which abandons the idea of 'magnetic features' and treats pixel-wise the photospheric magnetic flux density concentrations as homogeneous patches of a flowing substance (field). This approach was recently developed by Gorobets et al. (2016) and Gorobets et al. (2017) (hereafter Paper I and Paper II), who established that (1) line-of-site (B LOS ) and longitudinal components of SSMF density evolve as Markov chains (Paper I), (2) SSMF is a phenomenological thermodynamic system in a non-equilibrium state (NS, Paper II), and (3) the observed NS thermalizes into a state with a maximum of the informationtheoretic entropy (Paper II). Here, we develop further this thermodynamic approach to study dynamics of SSMF.
Conceptually, systems in NS interact with their sustained environment (medium, heat bath, or reservoir) by gorobets@leibniz-kis.de means of influx and efflux of heat, energy, and/or work. If fluxes are time-independent, the system reaches a nonequilibrium steady state (NESS). The environment remains in equilibrium. This implies that interactions do not change the macrostate of the environment, but the environment steadily drives the system away from the equilibrium. Together, they form a larger, isolated total system (e.g. den Broeck & Esposito 2015).
According to the second law of thermodynamics, entropy of the isolated total system, as a macroscopic quantity, should increase in time. However, it fluctuates due to stochasticity of the microstates, i.e. entropy does not grow monotonically. The probability of the microscopic entropy consumption versus entropy production is quantified by the so-called fluctuation theorems (FTs) (e.g. Bustamante et al. 2005). The FTs and their implications form the framework of stochastic thermodynamics, which is a subject of intensive theoretical and experimental research (e.g. see reviews Harris & Schütz 2007;Marconi et al. 2008;Seifert 2012).
The goal of this Letter is to deepen our thermodynamic interpretation of SSMF dynamics. First, we apply the NESS model to the observed fluctuating B LOS . Then, we show that detailed FT and integral FT are valid on the 'microscopic level' of discrete time-ordered sequences (trajectories) of B LOS at fixed positions of magnetogram images.

Microscopic states and trajectories
As in Paper II, we employ the language of thermodynamics to analyse and interpret evolution of photospheric SSMF in a novel way. We read a single solar magnetogram im-age as a snapshot of microscopic states pixel-wise constituting B LOS as an extended macroscopic system. Then, at every pixel, we trace in time its local microscopic dynamics. This is done in the manner of continuous medium sampling by independent detectors (pixels) within the fixed field of view (FOV) (Paper I). In time, from image to image, each pixel registers a random sequence of B LOS signal values (mi- (1) Thus, in our approach, B LOS is represented by an ensemble b(t) of finite-length realizations, cf. trajectories in phase space. The phase space is a finite set of all observed microscopic states. The data trajectories consist of sequential non-noise pixel values within the same FOV during a given observation time T . We denote a single trajectory of length n as a time-ordered vector where t is the trajectory's local time index starting at local origin t 0 , ∆t is data cadence with 0 ≤ t 0 ≤ T − ∆t, and t n−1 = At a single pixel, the number of trajectories is arbitrary. It depends on the observation time and the particular solar magnetic field topology. Statistical properties of trajectories are assumed to be homogeneous in space (at least, in the quiet Sun). Hence, trajectories from different pixels contribute to overall statistics equally, i.e. independently on pixel coordinates. Therefore, in our approach, B LOS is just fluctuating in time quantity, with minimal spatial sampling equal to the pixel size and temporal sampling equal to ∆t.
From a thermodynamic perspective, B LOS can be characterized by macroscopic values which are quantities averaged over an ensemble of microstates. For instance, its nonequilibrium ensemble entropy S (t) can be written as a microscopic entropy averaged along all trajectories formed by an ensemble of microstates in time Here, is a microscopic system entropy along the trajectory b n , Ω is a discrete phase space, and p(·, t) is a time-dependent (nonequilibrium) occurrence probability density function (PDF). The microstate PDF is time dependent (see Section 4.1), and trajectories are considered as being distributed stationary p(b n , t) ≡ p(b n ). The microscopic extension of the entropy equation (4) was justified by Crooks (1999), Qian (2001), and Seifert (2005). The non-equilibrium of B LOS was examined in terms of transition probability matrix asymmetry (detailed balance violation) in Paper II. At the same time, trajectories obey the Markov property (Paper I), which allows us to estimate p(b n ). Thus, the joint occurrence PDF for b n (with n time-ordered independent arguments) can be explicitly computed by the following factorization: Here, w(b j |b i ) is the ∆t-step conditional PDF of a random transition from the microstate b i into b j , and p(b 0 , t 0 ) is the occurrence PDF of b 0 at the trajectory's initial time t 0 . The state space Ω (all possible values of binned B LOS ) has a finite number Ω of elements determined by the bin size. The bin size is computed as in Paper II. The PDF p(b, t) and the Ω × Ω transition matrix W of ∆t-step transition probabilities with the elements , Ω] provide complete information on the statistics of the ensemble b(t) due to the Markov property equation (5). In this way, pixel by pixel, we collect all necessary information for the microscopic description of the non-equilibrium B LOS system.

Entropy production along trajectories
Trajectories allow us to characterize B LOS as a thermodynamic system, which is in contact with its environment (medium), using a microscopic entropy flux ∆s. Here, we define such a flux for the system (∆s S ) and its medium (∆s M ), as well as their total (∆s T ).
The system's entropy (equation 4) variation is simply a change of microscopic entropy between the initial and final states of the trajectory .
The medium's entropy variation is defined by a single mi- This is a relative measure of the forward transition with respect to its reversal. The latter occurs when the environment statistically influences the system so that it returns to the previous state. Finally, the total entropy production of the system together with its medium ∆s T = ∆s S + ∆s M is defined for a Markovian b n as follows: whereb n is the time-reversed trajectory of b n , i.e. b n is read backwards. The p(b n ) and p(b n ) differ by the order of the arguments in correspondent w(·|·) of equation (8) and by PDFs of the corresponding initial states at t 0 and t n−1 . How to compute PDFs of the initial states is explained in Section 4.1. We note that the environment interacts with the system by means of some kind of energy ('heat'), which is a path function rather than state variable. Thus, the environment influences the probabilistic evolution between states w(b j |b i ) but not the states b i( j) themselves (e.g. Hinrichsen et al. 2011). In the context of B LOS , we define its environment as all physical processes and conditions affecting B LOS by means of energy transfer and/or conversion, which are not considered and/or inaccessible by our measurements of B LOS .

Fluctuation theorems
The microscopic entropy production ∆s T obeys welldefined statistical relations (e.g. Klages et al. 2013;den Broeck & Esposito 2015), which we verify in our analysis.

Detailed fluctuation theorem (DFT)
DFT defines the exact relation between probabilities for the positive and negative entropy production of the same magnitude |∆s T |: This exponential dominance of entropy-generating trajectories over entropy-consuming trajectories quantifies the microscopic irreversibility in stochastic dynamics of the system. With the normalisation condition for p(b n ), DFT leads to equation for the ensemble average (over all trajectories) Using the Jensen inequality e x ≤ e x , we obtain the second law of thermodynamics: ∆s T ≥ 0, which is the macroscopic consequence of the exponential smallness of the entropy consumption constrained by DFT.

Integral fluctuation theorem (IFT)
A set of trajectories of equal n can be split into two disjoint subsets with respect to the sign of ∆s T (b n ). IFT predicts the probability ratio of entropy-consuming trajectories (∆s T (b n ) < 0) to entropy-generating trajectories (∆s T (b n ) > 0): The trajectory length n in this equation is a parameter, i.e. the right-hand side averaging is carried over a subset of entropygenerating trajectories of particular n (e.g. Carberry et al. 2004).

OBSERVATIONAL DATA
We analyse uninterrupted SDO/HMI observations of the quiet Sun B LOS near the disc centre Schou et al. 2012). We have chosen a sequence of 15335 magnetograms in the Fe I 6173 Å line from 2017 February 2, 00:00:23 UT until 2017 February 8, 23:58:53 UT with a cadence of ∆t = 45 s and angular resolution of 1 ′′ . The images were preprocessed with the hmi prep.pro procedure from the SolarSoft package, and then cropped to the 400 × 400 pixel area around the disc centre. Here, we focus on B LOS , since the available data have sufficient temporal resolution only for the B LOS component of the vector magnetic field in SSMF. However, the fundamentally important Markov property for transverse component was also demonstrated for high resolution measurements of SSMF (Paper I).
To minimize a possibly induced 'memory effect' by the data pipeline preprocessing, we use near-real-time series hmi.M 45s nrt. These data are linearly interpolated filtergrams over three temporal intervals, in contrast to the sincfunction spatio-temporal interpolation over five intervals in regular (non-nrt) data series (Martínez Oliveros et al. 2011;Kleint 2017). The slightly overestimated noise level of σ = 10.3 Mx cm −2 (Liu et al. 2012) for the disc centre is used, as in Paper II.
It is known that the orbital velocity of the SDO satellite relative to the Sun is a periodic function with the amplitude of ±3 km s −1 (FITS header keyword OBS VR). HMI line-of-sight observables are hence affected by periodic Doppler shifts of the spectral line due to the satellite's orbit. Together with the solar rotation, this satellite's geosynchronous orbital motion leads to temporal and spatial inhomogeneous instrumental variations of inferred magnetic fields over the solar disc with the period of 24 h (Hoeksema et al. 2014).
To have statistically homogeneous data, we select images with a uniform noise pattern within the cropped area. The selection is made by estimating ∆η(t) = |η(t) − η(t + ∆t)| xy , where η(t) and η(t + ∆t) are noise pixels (|B LOS | < 2σ) with the same coordinates {xy} in two subsequent images, while averaging is spatial. We have found that discrepancy in ∆η(t) computed separately for the west and east disc parts of the cropped area is minimal when the satellite's orbital velocity ranges 0.15 − 1.6 km s −1 . This range of velocities defines ≈ 2 h-intervals in the magnetogram data for each cycle of the SDO satellite turnover. In total, we have 16 such intervals during the selected observational sequence.

Time dependence of the microstate PDF
When assembling trajectories from magnetogram time series, we seek for pixels with persistent non-noise signals. Our algorithm is identical to the one introduced in Paper I and Paper II.
First, we independently choose pixels above the noise cutoff threshold in two images at t and t + ∆t. Then, in the same two images, we select pixel pairs which are above the cut-off simultaneously -they become contributors to trajectories at corresponding pixel positions. This iteration is repeated after shifting the two-image-stencil to the next position in time by the ∆t-step, so that the next pair of images is at times t + ∆t and t + 2∆t. We take care to avoid selecting samples twice, i.e. two iterations with one stencil shift described above give three (not four) samples in the trajectory, because the same image appears twice in the stencil per two iterations. Finally, to make samples b i (t) in b j (t + ∆t) being distributed with the same mean, the local three-image average is subtracted from the current image pair contributing to the trajectory.
While gathering statistics, by sequential shift of the stencil through the whole sequence of magnetograms, we found a non-vanishing discrepancy ∂ t p = p(b, t + ∆t) − p(b, t) /∆t 0, known in the literature as the probability current. By construction, it is assumed to be stationary for t ∈ [0, T ], and it corresponds to the macroscopic flux (or fluxes) constituting the NESS macrostate. Physically, it is related to steady processes altering B LOS on ∆t time-scale in our data.
According to our algorithm, samples in trajectories belong to alternating NESSs characterized by p(b, t) and p(b, t + ∆t). Therefore, in equation (8) p(b n−1 , t n−1 ) = p(b, t + ∆t) which is the b occurrence PDF in the ∆t-stable non-noise pixels in every second magnetogram of the sequence, and p(b 0 , t 0 ) = p(b, t).

Test for DFT
We verify and compare DFT for three sets of trajectories b n : (1) simulated with normally distributed b t and n, (2) assembled from HMI noise pixels (signal ≤ 2σ), and (3) assembled from HMI data with the signal ≥ 4σ. In the last two sets, n is defined by the noise-signal intermittency.
These sets define the time-forward structure of the corresponding W, but none of them provide reverse sequencesb n explicitly. Therefore, time reversals in equations (8) and (9) are computed formally. It is remarkable that natural timeforward stochastic dynamics of microstates in sets (2) and (3) reveals such time-forward trajectories whose reversals lead to existence of microscopic ∆s T < 0, as shown in Fig. 1.
The set (1) of Gaussian trajectories with statistically independent microstate occurrences has a symmetric entropy production PDF p(∆s T ), as expected (see Fig. 1A).
The observed noise in the set (2) should in principle have a Gaussian nature of statistical independence. However, it ap-  (10) versus ∆s T (same notation as in the upper panels). The orthogonal distance regression fit y = α + βx (black) applied to the non-noise data with α = −0.00065 ± 0.00918 and β = 0.99287 ± 0.00891 strongly supports DFT.
pears that residual biases in data processing and instrumental effects break the time reversal symmetry. The p(∆s T ) for HMI noise trajectories shown in Fig. 1B reveal a noticeable discrepancy between p(∆s T > 0) and p(∆s T < 0) (black line versus green line). The B LOS signal trajectories in the set (3) validate DFT, as demonstrated in Fig. 1C. The symbols depicting p(∆s T < 0) exp(∆s T > 0)) remarkably follow the solid curve of p(∆s T > 0). This confirms the relation given by equation (10). At the origin, p(∆s T ) is symmetric, implying that the irreversibility is detectable for relatively large ∆s T corresponding to quite prolonged times (see discussion of Fig. 2B).
In Fig. 1D, we plot the logarithm of equation (10). It should be a linear function of ∆s T with the slope of 1 for larger ∆s T , where asymmetry of p(∆s T ) is the strongest. The fit (black line) confirms the diagonal slope of the logarithm of equation (10) for the B LOS signal trajectories. This behaviour appears to be robust against variations in the number of 2 h-intervals used in the analysis as well as against the noise cut-off level.
The green line in Fig. 1B and Fig. 1D corresponds to the noise trajectories whose p(b, t) and W were estimated during only one 2 h-interval. The slope of the green line in Fig. 1D is 0.104 ± 0.001. When increasing the number of 2 h-intervals for the noise trajectories, the slope increases by ≈ 0.066 per interval, up to the limiting value of 1. A possible source of such a data-like behaviour in the noise may be hidden in HMI data calibration techniques, such as discussed by Hoeksema et al. (2014). Alternatively, the noise may contain some weak traces of the B LOS signal. If the latter is true, we may gradually amplify the statistical significance of this weak signal by increasing the number of 2 h-intervals.

Test for IFT
To validate IFT, we compute the left-hand and right-hand sides of equation (12) as independent functions for trajectories of a particular n. In Fig. 2A, the result for B LOS data trajectories is shown as red crosses (left-hand side) and black circles (right-hand side). They coincide well within errors. The errors are computed as standard deviations of ∆s T for entropy-generating trajectories. The blue line in Fig. 2A corresponds to equation (11). On average, it is close to 1, especially for shorter trajectories, which occur more frequently.
The exponential excess of entropy-generating trajectories must lead to a net increase of entropy with time in the total system in accord with the second law of thermodynamics. To verify this, we plot time-averages of ∆s T , ∆s S and ∆s M as functions of n in Fig. 2B, which are the averages over trajectories of time length n∆t. First, the plot demonstrates that ∆s S averages to zero (blue line). This is because the system in NESS exchanges energy with the medium at a constant rate, i.e. dS /dt = 0. And second, non-negative increasing function ∆s M (red line) reveals imbalanced (non-equilibrium) transitions in the system (see Hinrichsen et al. 2011, section 2), and, at the same time, increase of entropy in the environment, which is the energetic cost to keep the dissipating system in the NESS. According to the NESS model, the medium stays in equilibrium, and hence it should balance own reaction to changes in the system on time-scales much shorter than required to change the macroscopic state of the medium. This time-scale separation is the underlying mechanism for the existence of NESS (e.g. see Seifert 2012, section 1.2).
Since ∆s M grows and ∆s S fluctuates near zero, ∆s T = ∆s S + ∆s M (black line) grows almost the same as ∆s M . However, fluctuations of ∆s S are crucial on the microscopic level, since the DFT is valid only for ∆s T as verified by our analysis.
The macroscopic fluctuating entropy S (t) as the average of microscopic entropies along trajectories requires a certain observation time, over which the time-average manifests its growth, say a mesoscopic time-scale. Larger system, shorter is its mesoscopic time-scale. In our analysis, the existence of the mesoscale is implicitly shown by the initially slow increase of ∆s T in Fig. 2B. For small n around the peak of p(b n ), ∆s T is indeed negligibly small.
We note that estimates in Fig. 2A and Fig. 2B appear to diverge with time. This is because longer data trajectories are less frequent, as shown in Fig. 2C.

SUMMARY AND CONCLUSIONS
We have shown that the fundamental FTs discovered both theoretically and experimentally in the framework of stochastic thermodynamics are also valid for evolution of solar SSMF. In particular, B LOS fluctuations in SDO/HMI quiet photosphere data with the pixel size of 0.5 arcsec and cadence of 45 s firmly satisfy both DFT and IFT. We have also found a non-zero probability current as a systematic statistical difference in PDFs of the same spatial structure of B LOS . Such probability currents are used to identify NESSs (e.g. Zia & Schmittmann 2007).
Thus, evolution of SSMF in the solar photosphere can be considered as a stochastic NESS ensemble governed by FT relationships on the microscopic level and by the second law of thermodynamics on the macroscopic one. In the essence, our approach is based on the information-like defi-nition of the entropy, i.e. it is dimensionless (Shannon 1948;Cover & Thomas 2006). Whether and how the studied here entropy production by SSMF may be related to heating of the upper solar atmosphere and general energy transfer is to be clarified. We suggest that a similar analysis is carried out for other small-scale phenomena in the solar chromosphere, transition region, and corona. In addition, such an analysis can be applied to MHD solar simulations to verify whether simulated SSMF have the same statistical properties as observed ones.
Our DFT test has also revealed that noise in HMI data changes its statistical properties on the time-scale longer than one SDO orbit. For relatively short-time intervals (few hours), noise samples behave as being statistically independent.
This work advances our new approach to the analysis of evolution of solar magnetic fields based on phenomenological thermodynamics and information-theoretic definition of entropy. We believe that it has a potential for applications to other astrophysical complex phenomena observed in continuous media (fields), as well as for revealing systematic errors in data.
6. ACKNOWLEDGEMENTS This work was supported by the European Research Council Advanced Grant HotMol (ERC-2011-AdG 291659). SDO is a mission for NASA's Living With a Star (LWS) program. The SDO/HMI data were provided by the Joint Science Operation Center (JSOC).