{'fraction_non_alphanumeric': 0.044219057596444976, 'fraction_numerical': 0.010810126290825783, 'mean_word_length': 4.473471959672338, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Non-Equilibrium Thermodynamics and Topology of Currents

In many experimental situations, a physical system undergoes stochastic evolution which may be described via random maps between two compact spaces. In the current work, we study the applicability of large deviations theory to time-averaged quantities which describe such stochastic maps, in particular time-averaged currents and density functionals. We derive the large deviations principle for these quantities, as well as for global topological currents, and formulate variational, thermodynamic relations to establish large deviation properties of the topological currents. We illustrate the theory with a nontrivial example of a Heisenberg spin-chain with a topological driving of the Wess-Zumino type. The Cram\'er functional of the topological current is found explicitly in the instanton gas regime for the spin-chain model in the weak-noise limit. In the context of the Morse theory, we discuss a general reduction of continuous stochastic models with weak noise to effective Markov chains describing transitions between stable fixed points.


I. INTRODUCTION
Dynamics of complex systems, in the presence of disorder and under external forces, is often modeled by nonequilibrium stochastic processes. Despite the considerable interest in such models, exact results, or even effective approximation methods are not readily available for generic situations. Instead, specific results were derived under restricting assumptions; for instance, the case of steady-states was investigated in many publications (a complete list would be prohibitively long), drawing upon the methods provided by the Large Deviations Principle (LDP), developed, for example, in Refs. 2, 20, 22, 23, 51. More recently, the LDP-based methods were applied to the case where the quantities of interest are time-averaged observables, like currents or densities of particles [6,7,8,9,16,21,31,41,42]. Even more attention was paid to the production of entropy, which is actually a linear functional of currents, and related fluctuation theorems. (See, for example, Refs. 13,14,19,27,29,33,35,38,40,45,55,59). However, prior studies have only considered processes in spaces with a trivial topological structure, in the sense that we will explain in the following. To the best of our knowledge, the topological nature of global currents (fluxes) has not been discussed before.
In most cases, stochasticity of dynamics and observation errors make detailed knowledge of system trajectories unnecessary and distracting. Fortunately, one can often find topological characteristics of the system, which are easier to observe. We suggest that properly defined stationary currents are such topological characteristics.
In the present paper, extending on our recent preprint [16], we address the problem of deriving statistical properties of empirical (time-averaged observable) currents for non-equilibrium stochastic processes which are equivalent to random maps between compact spaces with nontrivial topology. We employ a method inspired by the LDP, but also special field-theoretical tools developed originally in the context of nonlinear sigma-models [1].
Our main results concern deriving via LDP explicit asymptotic expressions for joint distribution function of current density and density and distribution function of total topological current in non-equilibrium steady state stochastic systems (stochastic maps) defined on compact spaces. Existence of a nontrivial large deviations distribution for net currents and the resulting thermodynamic relations are intimately related to nontrivial configurations of maps from the base domain space to the target space. We mainly focus on yet unexplored relationship between the large-deviations probabilistic techniques for non-equilibrium systems and the topological structure of the configuration spaces of the model. From that perspective, this article makes a completely novel contribution. In the present study we consider a global static violation of detailed balance, in contrast to stochastic pumping problems, where changing parameters in time brings the system out of equilibrium [3,15,53].
The power of the aforementioned general results and technique is illustrated on the enabling example of a circular spin chain, corresponding to a stochastic process mapping from the torus to the sphere. (See Fig. 1 for illustration.) A physical realization of this model could be the following: consider a nano-structure represented by a circular spinchain of N ≫ 1 classical interacting spins characterized by unit vectors n i where i = 1, . . . , N , coupled to a stochastic external magnetic field B. Note that such a device could be used as a magnetic field detector, by measuring the response of the spin chain as a function of time. It is most useful to consider the low-energy, long-wavelength limit of the problem, which would correspond to a high sensitivity of the device. Therefore, we will restrict our attention only to the spin couplings relevant to the long-wavelength approximation. The spin system can be driven in other ways than by an external magnetic field. For example, a nonconservative force, a so-called spin transfer torque, is caused by a spin-polarized current [54,58].
Other possible realizations of the spin-chain model are molecular motors [4,36,46] which often exhibit periodic motions resulting from nonconservative driving. Although specific examples may not have been yet discovered, we believe that there are relatively simple non-equilibrium bio-molecular systems whose functioning is controlled by topological currents, probably far more complex than those discussed here in the context of the spin-chain model.
Performing precise measurements in such setups, in the presence of fluctuations, is essentially related to the ability to detect collective modes of the chain n i , by integrating the response over a time interval. Therefore, such a device would be a natural detector of the total current associated with the integrated response of the entire chain. Our analysis will focus on the probabilistic description of the empirical current (time-integrated response) and generalize to compact spaces the study of the current density distribution (or a 1D current), the focus of earlier works [6,7,8,9,16,21,31,41,42] in both single-and many-particle systems. The total current in our spin-chain example originates from global, topological characteristics of the system, as locally the stationary force driving the system is potential. In fact, this example represents the case of the topological driving associated with a multi-valued potential of the Wess-Zumino type [1,47,61], and thus the essential part of our analysis will be devoted to establishing large deviations characteristics of the global (topological) current in the spin-chain model.
The material in the paper is organized as follows. In Section II we introduce a general stochastic model and a specific example with a nontrivial topology. All the results of the paper are briefly discussed and listed at the end of this introductory Section. In Section III we present a topological picture of stochastic currents. In Section IV we consider overdamped continuous stochastic processes. We review some results related to statistics of the empirical density, and current density, as well as other extensive observables derived from them. We also extend the large deviation theory to nontrivial topologies and develop a general approach to obtain large deviation functions for topological currents. Section V is devoted to a non-equilibrium stochastic model with a nontrivial topology: a classical Heisenberg spin chain driven by a topological term of the Wess-Zumino type. In Section VI, in addition to giving a summary and conclusions, we discuss a general reduction of continuous stochastic models in the weak-noise limit to effective Markov chains with the help of the Morse theory. Appendices contain some technical details and auxiliary material.

A. General Stochastic Model
We consider a stochastic process/trajectory η t = {η(τ )|0 ≤ τ ≤ t}, or more rigorously η t : [0, t] → M of duration t, which occurs in a configuration space M, i.e., η(τ ) ∈ M for 0 ≤ τ ≤ t. The configuration space M is assumed to be a manifold of dimension m = dimM , so that the particle position η(τ ) at any given time can be characterized by a set η i (τ ) of local coordinates with i = 1, . . . , m. Our stochastic process can be described by the following Langevin which is a continuous limit of the well defined discrete-time stochastic differential equations written, for example, in the Itô form. The quantities discussed below that depend on the continuous time should be understood as limits of the their properly discretized forms. In Eq. (1) F i denotes the deterministic (advection) component of the particle velocity, linearly related to the driving force F j (overdamped dynamics), via the mobility tensor g ij (η) that can be viewed as a Riemann metric on the configuration space M . Due to the Einstein relation (fluctuation-dissipation theorem), the same tensor κg ij , weighted with a factor κ that controls the noise strength, characterizes the correlations of the Gaussian Markovian noise in Eq. (3): If our stochastic dynamics is interpreted as a result of elimination of fast components in harmonic bath modeling (to achieve the Markov limit), the Einstein relation means that the bath is at equilibrium at temperature κ, and non-equilibrium features of the system's stationary state can result only from the non-potential nature of the driving force F . Hereafter we imply summation over the repeating indices and assume, without loss of generality, that the metric is curvature-free. Eqs. (3) are consistent with the stochastic (Onsager-Machlup [48]) action (with g ij : g ij g jk = δ k i ) defining the probability measure over η t , such that the stochastic average of a functional •(η t ) of η t (e.g., an observable accumulated over time t) is evaluated according to where the denominator is usually called the partition function. In Eq. (5) we use standard notations for the path integrals over trajectories and assume proper discretization over the time interval [0, t]. Distinction between different discretization conventions is irrelevant for the Cramér functions in the low-noise limit. We introduce the empirical density and current at a point x of the trajectory's configuration space: We are interested in the large-deviation limit of the joint probability distribution function for ρ t and J t , Assuming that the observation time t is large and focusing primarily on statistics of ρ t , J t defined above one observes that a distinction between an open trajectory with η(0) = η(t) and a closed trajectory with η(0) = η(t) disappears at t → ∞. This fact, also discussed in detail in Section III, allows us to focus on the analysis of closed trajectories.
The joint distribution function of current density and density defined in Eq. (8) is a very useful and rich object carrying sufficient amount of dynamical and topological information about the system one would normally be interested in. However, from the point of view of experimentally and computationally desirable low-dimensional characterization of the stochastic system, the functional P t (J, ρ) is still too complicated. One would like to introduce a version of Eq. (8) of smaller dimensionality, with inessential parameters integrated out. We suggest that a topologically protected quantity satisfying these requirements is the equivalence class components of the intersection index between a closed trajectory η t and a cross-section α of M , which we denote symbolically as Here [α] indicates that the object is invariant with respect to continuous transformation from one cross-section to another within the same equivalence class. Obviously, currents can be added and multiplied by numbers, where respective operation is executed over the corresponding current densities. Therefore, currents ω t can be viewed as vectors that reside in a certain vector space, a current space. The current components ω [α] t , introduced in Eq. (9), are labeled by linearly independent equivalence classes [α] of cross sections, whose number defines the dimension of the current space. Further details (including formal definitions) will be given in Section III. As in other parts of this manuscript, our main focus will be on evaluating the LDP asymptotic for the respective distribution function Notice that the number of the linearly independent equivalence classes [α] (the dimension of the current space) naturally depends on M , being a small number for common topological problems (field theories). For example, for the problem considered in Section V the current space is one-dimensional.

B. Circular Spin Chain
In the large N limit, N → ∞, we can describe the circular spin-chain model using a map n(y, τ ) = (n a (y, τ )|a = 1, 2, 3 & a n a n a = 1), which represents the three-dimensional unit vector parameterized by the angle y ∈ [0, 2π] at the time τ . By imposing periodic boundary conditions in y and τ , we also find convenient to think about the model as of a (1 + 1) field theory, i.e. as of a stochastic map S 1 × S 1 → S 2 .
To illustrate the general topological results we will consider the following version of the model (1): where parameters u and v correspond to strength of driving and overall noise normalization respectively and [•, •] is the standard notation for the vector cross-product. (Eq. (12) guarantees the transversality of the noise term to the n(y, t) field, and it is also straightforward to verify that all terms on the rhs of Eq. (12) are in fact transversal to n(y, t). As argued in the Introduction, this model can describe the long-wavelength limit of a nano-scale spin device manipulated by magnetic field [54,58]. In fact, Eqs. (11) represent the most general weak-noise, weak-driving stochastic equations which may be built for the map n(y, t) in the long-wavelength limit, thus keeping only low-order spatial gradients (over y). It is important to emphasize that the local force in the spin-chain model is conservative, and the non-equilibrium character of the stochastic process is due to global (topological) effects. These topological aspects of the model will be discussed in detail in the two first Subsections of Section V. The Onsager-Machlup action (4) that corresponds to the Langevin dynamics described by Eqs. (11) and (12) has a form Setting v = 0 turns this action into the known model, often called a (1 + 1) nonlinear σ-model on a sphere with a topological term (often referred to as a θ-term) [1]: The nonlinear σ-model of Eq. (14), considered as an imaginary-time field theory, has ultraviolet divergences, and thus requires a small scale regularization. In fact, our circular spin chain model (11) may be viewed as a regularized counterpart of the σ-model, where the number N of spins plays the role of the ultraviolet cut-off parameter. An intuitive explanation for this regularization is that the v-term in Eq. (11) acts to align all the spins and, therefore, suppresses the short-range fluctuations. In this manuscript we will focus on analysis of the circular spin-chain model in the weak-noise limit κ ≪ |u| v, which will also be coined (by the reason to be spelled out later in Section V) the limit of "instanton gas", correspondent to moderate topological driving 1 . We demonstrate that the configuration space of the spin-chain model has one topologically nontrivial cycle (i.e., the current ω is single-component). In the considered limit the system spends most of the time around its stable configuration, whereas the current is generated by rare events, referred to as instantons, whose interaction can be neglected due to long time intervals between them.

C. Statement of Results
The main results reported in this manuscript are as follows: • In Section III we establish a topological nature of the average current generated over a long time in a stochastic system. The topological stochastic current ω resides in a vector space, referred to as the current space, whose dimension is given by the number of independent 1-dimensional cycles of the system configuration space M . We demonstrate that there are two equivalent ways to view the generated topological currents: (i) the rates with which the stochastic trajectory loops around the independent 1-cycles, and (ii) the equivalence classes of the divergence-free current density distributions. The equivalence of these two views is established by the Poincaré duality represented by Eq. (18).
• We show in Section IV that for a stationary stochastic process the joint probability distribution for the empirical current density and density in the t → ∞ limit takes the form P t (J, ρ) ∼ exp(−tS(J, ρ)) with the Cramér functional This generalizes the previously reported results [6,7,8,9,16,41,42] to the case of topologically nontrivial compact spaces.
• In Section IV C we describe a general method to derive large-deviation statistics of particular currents (e.g., the Cramér function of the topological currents) from Eq. (15) in a variational way by solving a respective set of equations for currents and densities.
• We illustrate the utility of the general approach on the example of the thermodynamic limit N → ∞ of the spin-chain model defined above in Section II B. We show that the topological current space of the model is one-dimensional, i.e., the generated current is described by ω ∈ R. We compute the Cramér function S(ω) in the weak-noise limit κ ≪ v, |u| for not too large values of the generated current ω for |ω| ≪ |v|(ln(|v|/κ)) −1 , when the instanton gas mechanism dominates the current generation. In this instanton-gas regime the Cramér function S(ω) has the same form as for the effective 1D random walk (equivalent to a circular two-channel single-state Markov chain) with jump rates κ + and κ − in opposite directions: the rates κ ± being expressed through the parameters u and v of the model (11) by means of Eqs. (62), (89), (91), (83), and (93).
• In general, the vector of topological currents ω is not related to the work produced by the driving force, t 0 dτ (F (η) ·η). However, in the case of topological driving, as in the spin-chain model, the work becomes a linear functional of the current vector.

III. TOPOLOGICAL VIEW OF STOCHASTIC CURRENTS
Historically, a concept of current appeared in physics on a macroscopic level as a way to describe a flux of any kind. Consider an electric circuit, represented by a circular wire with a static electric field (for example, provided by charge sector (not relevant for our application). The authors mapped the model onto a system of infinite-component massless interacting fermions, analyzed it with the Bethe ansatz approach and thus arrived at a remarkable exact and nontrivial solution. Notice, that an intermediate case of "interacting instantons", correspondent to strong topological driving and vanishing noise, κ ≪ v ≪ |u|, constitutes yet another interesting regime, which to the best of our knowledge was not studied yet. The Cramér function in this later case can be calculated explicitly by integrating over the instanton solutions and Gaussian fluctuations around them in the limit v = 0. As demonstrated in Ref. [28] in the context of the σ-model as a field theory, the problem is equivalent to finding the ground-state energy of the corresponding (1 + 1) sine-Gordon model, where v will play a role of the ultraviolet cut-off parameter. In the case v < u the saddle and stable points of the spin-chain system coalesce producing a peculiar fixed point at θ = 0 which is stable when approached from one direction and unstable from the other one. All such situations are beyond the scope of this work. a battery) where the electrons on average move in one direction. The current is defined as a charge crossing some oriented section α per unit time. The current can be considered as a sum of currents from individual particles. An individual contribution ω is given by ω = N t −1 with N = N + − N − , where N ± is the number of times the particle trajectory η crosses the section α in the positive and negative directions, respectively (see Fig. 2). The configuration space M for the particles in the circular wire is three-dimensional, i.e., m = dimM = 3, and can be represented as M = S 1 × D 2 (with S 1 and D 2 being a circle and a two-dimensional disc, respectively), whose boundary is ∂M = S 1 × S 1 . If the particle trajectory η is closed, i.e., η : S 1 → M , the number N does not change upon deformations of the trajectory and the cross-section α. This number, known as the intersection index, only depends on the equivalence classes [η] and [α] and can be denoted by [η] * [α] ∈ Z. The equivalence, based on deformations, is the homotopical equivalence 2 .

A. Intersection Index and Stochastic Currents
The intersection index does not change if any of the cycles is replaced by a homologically equivalent counterpart. Since cycles can be added and multiplied by the integers (by forming disjoint unions and changing orientations), this equivalence can be understood if we define a zero cycle. Formally, a j-dimensional cycle is called homologically equivalent to zero, if it is a boundary of a (j + 1)-dimensional region mapped into M . Obviously homotopy equivalent cycles are homologically equivalent. The set (actually an Abelian group) of homological classes of j-dimensional cycles in M is called the j-th homology of M and denoted by H 1 (M ; Z). In the circular wire, an element of H 1 (M ; Z) represents the number of times the particle trajectory moves around the circuit: H 1 (M ; Z) ∼ = Z. The current ω associated with the trajectory η can be naturally defined as ω = [η]t −1 ∈ H 1 (M ; R) = H 1 (M ; Z) ⊗ Z R. In the circular wire of Fig. 2 the current has only one component because H 1 (M ; R) = R.
The topological picture, presented above on the simple example of a circular circuit, can be extended to a much less intuitive general case in a pretty straightforward way by viewing an averaged current ω generated in stochastic dynamics in the configuration space M as an element in H 1 (M ; R), the first homology group of M with real coefficients, associated with the homology class [η] of a stochastic trajectory. Since H 1 (M ; R) is a real and in most relevant cases finite-dimensional vector space, the generated current can be viewed as a vector. The homology groups can be finite-dimensional and computable even in the field theory when the configuration space M is represented by an infinite-dimensional (in the non-regularized continuous limit) space of maps. In particular, in our enabling case of M = Map(S 1 , S 2 ) discussed in Section V, the current also has only one component since Notice also that, originating from counting, stochastic currents can be viewed as topologically protected observables, available in single-molecule measurements, which provide stable and at the same time rich information on the underlying stochastic processes.
The topological picture of stochastic currents can be formulated in the simplest way when defined for closed trajectories (loops). However, a general stochastic trajectory is open, i.e., its end point is typically different from the starting one and thus adopting the topological language of intersection indexes and currents may seem problematic. In the long-time limit considered in this manuscript, extension from open to close trajectories does not constitute a problem. Indeed, when counting the intersection index N of a long trajectory, one can always close it with a segment (e.g., a geodesic line) that is much shorter than the trajectory itself, which creates an uncertainty no more than one in a big number N ≫ 1. In contrast to a boundary effects with unbounded fluctuations [52,60], in the long-time limit in our case one can safely ignore changes in the statistical properties of the trajectories caused by this modification.

B. Currents, Current Densities, Zero-Curvature Vector Potentials and Poincaré duality
Currents can also be represented by the current densities J defined as time integrals over trajectories as in Eq. (7). In this Subsection we will discuss some important "static" relations between J, the current ω, and the intersection invariant [α].
The time-averaged current density from Eq. (7) is a random variable on the space of stochastic trajectories η(τ ) and satisfies the relation Therefore, our first observation is that the random variable divJ t ∼ t −1 vanishes in the limit t → ∞. Moreover, Eq. (17) guarantees that the current density is exactly divergence-free, div x J t (η t , x) = 0, if only closed stochastic trajectories are considered, which, as argued in Section III A, does not affect the long-time behavior of the relevant distributions.
The vector field of the current density on the m-dimensional phase space can be naturally viewed as a differential form of rank (m − 1) because its integration over a (m − 1)-dimensional cross-section section α results in a current. In the following we will use the same notations for vector fields and the corresponding differential forms. The divergence of the current density J is represented by the exterior derivative as div x J = dJ, and Eq. (17) suggests that the current density is a closed from: dJ = 0. Therefore, it represents a class [J] in the de Rham cohomology H m−1 (M ; R). The relation between the homological and current-density representations of the current is determined by the Poincaré duality [56]. This can be formally expressed as thus representing that per unit time intersection index t −1 [η] * [α] of a closed trajectory η with a cross-section α is equal to the integral over α of the current density J produced by the trajectory. We conclude this Section by noting that the Poincaré duality H m−1 (M ; R) ∼ = H 1 (M ; R) in the complementary dimension leads to a natural representation of the sections α in terms of the vector potentials A, which are curvaturefree, i.e. 3 since the cross-section α represents a homology class [α] ∈ H m−1 (M ; R), whereas the corresponding vector potential A represents a gauge equivalence class [A] ∈ H 1 (M ; R). Here in Eq. (19) we used standard wedge-product notations for the differential 1-forms [32]. The relation "[A] correspond to [α] via the Poincaré duality" can be conveniently expressed in a way extending Eq. (18), which implies that the current components ω * [α] can be labeled by the gauge classes of the curvature-free vector potentials. This expresses the general Poincaré duality

IV. LDP FOR EMPIRICAL CURRENTS
In this Section, we describe results concerning the Large Deviations Principle (LDP) for (possibly) dependent sequences of random variables, including its application to the case of time-averaged current densities, and present a path-integral derivation for the relevant functionals. The material of this Section is organized as follows. In subsection IV A we very briefly review the foundations that stand behind the LDP and formulate a variational principle relating the LDP for current density and density to the LDP for conjugated vector and scalar potentials. In Subsection IV B we describe a convenient representation of the LDP in the intuitive path-integral language. In Subsection IV C we present a general method to derive the Cramér function of the topological currents from the Cramér functional of the joint density and current density distribution.

A. LDP for empirical currents and the Gärtner-Ellis theorem
Gärtner-Ellis (G-E) theorem [26,30] formalizes the Large Deviation Principe (LDP). It provides a convenient theoretical tool for studying the long-time behavior of stationary driven systems. In this Subsection we discuss fundamental relations and objects associated with the G-E theorem and the LDP.
Consider a sequence of random variables ξ τ ∈ H with τ = 1, 2, . . . , t. Denote by P t (ϕ) the distribution of the average Define the corresponding generating function Q t (ψ) = exp (tψ · ϕ t ) , with ψ ∈ H * being linear functionals in H. If the limit does exist, is represented by a convex and bounded from below function, and is represented by a bounded from above lower semi-continuous function with compact level sets, then {ϕ t } satisfies the Large Deviations Principle (LDP) with the rate (or Cramér ) function S. This is known as the Gärtner-Ellis (G-E) theorem [26,30]. The LDP is formulated in terms of the probabilities P t (K) = K dP t (ϕ) for the random variable {ϕ t } to belong to K ⊂ H. In many cases it can be formulated in a stronger, yet simpler form (see [26,30] for a general formulation): for any (measurable) set K ⊂ H where by definition the Cramér function is Note that even though the LDP and the G-E theorem are formulated above for a discrete set of random variables, the formulation also implies straightforward extension to the continuous parameterization t ∈ R + = {τ ∈ R|τ > 0}, where t plays the role of time. In particular, we choose ϕ t = (ρ t , J t ) ∈ H with divJ t = 0; the empirical density and current density are introduced in Eqs. (6) and (7), respectively. In accordance with discussion of Section III, the argument ψ = (V, A) of the generating function is represented by a potential function V conjugate to the density, and by a gauge equivalence class of an Abelian zero curvature gauge field A conjugate to the current density. The LDP can be viewed as a mathematically correct way to formulate a physically intuitive statement that under the described conditions at long enough times t the probability distribution adopts an asymptotic form By its formulation, specifically due to Eq. (24), the LDP allows the rate functions for reduced variables to be obtained via a variational principle. Let H ′ be the residence vector space for the reduced variables ϕ ′ t with the reduction (projection) map p : H → H ′ . In our case the reduced variables are the currents ϕ ′ t = ω t , so that H ′ = H 1 (M ; R) and the reduction map, obviously defined by p(ρ t , J t ) = [J t ], is linear. The conjugate to ϕ ′ t argument ψ ′ of the generating function Q ′ (ψ ′ ) resides in (H ′ ) * ∼ = H 1 (M ; R) and, therefore, can be represented ψ ′ = [A] by a gauge equivalence class of a curvature- Moreover, the LDP can be further interpreted as effectively implementing Legendre-type transformations between thermodynamic potentials (effective actions). We describe these general relations in the following paragraphs.
Let us also note that our stochastic theory of maps S 1 × Y → X is, in fact, a field theory; however, being identified as a theory of stochastic trajectories S 1 → M , with M = Map(Y, X), it can be interpreted as classical one-dimensional statistical mechanics in a circular system of the size t with the target space M . The time-averaged current ω t = t −1 Q t can be viewed as the density of the topological charge Q t = [δS t (A)/δA], obtained from the variational derivative of the gauge-invariant action S t (A) with respect to the stationary vector potential A, followed by switching to (homology) equivalence classes, the latter operation denoted by square brackets. Naturally, a gauge equivalence class [A] ∈ H 1 (M ; R) of curvature free vector field A can be interpreted as the chemical potential that corresponds to the topological charge Q. According to Eqs. (21), (25) the rate S(ω) = t −1 Ω t (ω) and the logarithmic generation ) functions can be interpreted as the densities of the free energy and thermodynamic potential, respectively, in the thermodynamic limit t → ∞. Naturally, they are connected via the Legendre transformation and the thermodynamic potential is represented by the effective action: Therefore, applying the LDP argument to the empirical current ω t will lead to a rate function S, which is simply the generation rate of the effective action for the currents of the theory. This restatement of the problem would be rather trivial, unless the theory had interesting topological structure. Indeed, as known from quantum field theories [1], in such cases currents may have non-perturbative, anomalous terms arising from global topological effects. As we will show in the remainder of the paper, this also happens in the non-equilibrium stochastic theory with driving.

B. Path-integral picture of LDP and the current density functional
In this Subsection we, first, derive the general (compact spaces) LDP expression Eq. (15) for the distribution of density current and density, and, second, discuss respective transformation to the conjugated variables (potentials).

Derivation of Eq. (15)
Using a standard representation for the Dirac δ-functional in Eq. (8) gives for the probability distribution function where the integration is performed over real auxiliary fields A and V , and DA and DV are the standard field-theoretical notations for functional differentials/measures. In the large deviation limit (t → ∞), the path integral in (30) is estimated as with −λ(A, V ) being the lowest eigenvalue of the operator −L A,V , For the normalized ground state eigenfunctionρ(x) we obtain Applying further the saddle-point approximation to the functional integral in Eq. (29) with respect to A, V , and using Eqs. (30)- (33), we arrive at the following equations: Actually, this saddle-point approximation involves a deformation of the integration contours to the complex plane, which makes A imaginary and V = 0 in the saddle point. Thus, the saddle-point approximation corresponds to the supremum with respect to (−iA) in the G-E theorem (in subsection IV A the definition of A differs from that of this subsection by a factor i). Solving Eqs. (33,34) for A, V andρ and substituting the result back in the saddle-point expression for the integral in Eq. (29) yields Eq. (15) for the Cramér functional. Note that boundary (surface) terms do not contribute due to the compactness of the target and base manifolds. In deriving Eq. (31) from Eq. (30), the gauge freedom was fixed by the requirement that the left eigenfunction ofL A,V , conjugated to the right eigenfunction ρ, equals unity.

LDP for charges generated by scalar and vector potentials
The explicit large deviation result (15) can be immediately used to get thermodynamics-like relations for Cramér functions of derived objects. One introduces the sets A (a) (x) and V (b) (x) of vector and scalar potentials, respectively (which can also be interpreted as gauge fields, i.e. generators of continuous symmetry transformations mentioned above), and the corresponding sets w A (J t ) and u V (ρ t ) of charges In the path-integral terms, the variational principe expression (36) can be obtained by representing the probability distribution followed by computing the integral in the t → ∞ limit using the saddle-point approximation.
Considering a marginalized version of Eq. (36), associated with the distribution functions of the charges, generated by the vector potentials only, we have P A (w) ∼ exp(−tS A (w)) with The variational principle, represented by Eq. (38) has two important implications that correspond to two specific choices of the gauge field sets A (a) (x). The choice A(x) = F (x) leads to the observable w F (J t ) that, obviously, represents the work (entropy) production rate, whose Cramér function S(w F ) satisfies the fluctuation theorem.
However, in this manuscript we focus mainly on the other implication of Eq. (38) associated with the set {A (a) } of curvature-free dA (a) = 0, ∀a is chosen in a way so that the corresponding set {[A (a) ]} of equivalence classes forms a basis set in H 1 (M ; R). According to the Poincaré duality, as described at the end of section III B and specifically due to Eqs. (18) and (20)  We should note for completeness that since ω ∈ H 1 (M ; R), the Fourier variable ψ conjugate to ω resides in the space ψ ∈ (H 1 (M ; R)) * ∼ = H 1 (M ; R), which results in the following representation: Going along the lines of derivation of Eq. (30) and using the Poincaré duality (20), which allows the identification ω = [J] and ψ = [A], we recast Eq. (39) as This representation implies that λ([A]) = λ(A, 0) is obtained from λ(A, V ) by restricting the to the zero V = 0 scalar potentials and curvature-free dA = 0 vector potentials.

C. Derivation of the Cramér functional for topological currents
This Subsection describes a general strategy for calculating the Cramér functional S(ω) of the topologically protected currents ω. This is achieved via the variational procedure, formulated in subsection IV A [Eq. (26)], equivalent to "integrating out" current density J and density ρ dependence for a fixed value of ω.
Specifically, we will minimize the Cramér functional (15) S(J, ρ) over J and ρ under the following conditions 4 : A variation of the current density that satisfies the continuity condition and keeps the topological current constant has a form δJ = d † ζ with ζ being a 2-form. A straightforward calculation allows the requirement δS/δζ = 0 to be represented in a form: where the second equality in Eq. (42) should be viewed as the definition of the vector field (1-form) A. The stationary current that minimizes S(ω) corresponds to A = 0. The vector potential A determines how the density and current density distributions locally differ at the given topological current and in the stationary regime. Note that the vector field introduced in Eq. (42) differs from its counterpart introduced earlier in Eq. (34) by a factor (−iκ). Thus, with a minimal abuse, we use the same notation for both and hereafter stick to the one given by Eq. (42). Variation of S(J, ρ) with respect to ρ is performed in a straightforward way by introducing a Lagrangian multiplier λ to satisfy the normalization condition [the second relation in Eq. (41)]. This results in Representing A as a gradient where ρ − (x) is a newly introduced scalar function, and substituting Eq. (44) into Eq. (43), one finds that the quadratic first-order Riccati-type equation (43) is transformed into the following linear second-order differential equation with the adjoint Fokker-Planck operator On a compact manifold M , eigenvalues λ are discrete and bounded from below. A solution of Eq. (45) corresponding to the lowest −λ determines ρ − (x) and λ. However, the function ρ − (x) is not necessarily single-valued and can acquire uncertainty in the result of going around topologically nontrivial cycles. We can find a unique solution A of Eq. (46) with the minimal eigenvalue if we fix a set Z = (Z k |k = 1, · · · , n) of topological parameters defined by the integrals over the set {s k } k=1,...,n of the topologically independent 1-cycles of M . To summarize, Eqs. (41)-(43) constitute a complete set of equations that can be used to obtain the Cramér functional S(ω) as well as the distributions ρ and J. This is achieved in three steps.
(1) We first solve Eq. (43) together with the constraint dA = 0 (i.e., the first relation in Eq. (42)) with respect to the vector potential A. As explained above this is equivalent to solving the linear lowest eigen-value problem (45) with the additional topological freedom fixed unambiguously selecting the sets Z = (Z k |k = 1, · · · , n).
(2) We combine the first two relations in Eq. (41) with the second relation in Eq. (42), which results in ¿From this linear system we find ρ and J in terms of Z parameterizing A 5 .
(3) The Cramér functional S can be obtained as a function of Z by substituting the solution obtained on steps (1) and (2) into Eq. (15). Finally, the substitution of the obtained solution for J into the third relation in Eq. (41) establishes a relation between Z and ω, which, being resolved with respect to Z in terms of ω, results in S(ω).
In the case dF = 0 of topological driving, the system of equations Eqs.  (15) and applying some reordering of terms, this allows the system of equations (41)- (43) and Eq. (15) to be recast as where for k = 1, . . . (ii) Upon substitution of A found on the first step into Eq. (50), the latter can be viewed as a system of homogeneous linear equations for the current density J, whose solution is unique up to a multiplicative factor.
(iii) We substitute the obtained current density J and vector potential A into Eq. (51), which is now viewed as a linear equation on the density ρ with an inhomogeneous term represented by J. Therefore, the normalization condition (the second equality in Eq. (51)) determines the prefactor in the current density, which identifies normalization (multiplicative) factors both for J and ρ.
(iv) We substitute A, J, and ρ into Eq. (52). This expresses the Cramér function S and the topological current ω in terms of Z. Expressing Z in terms of ω gives the desired Cramér function S(ω).
It is also instructive to note that an alternative representation for the Cramér functions allows the eigenvalue λ to be determined, which is useful for the weak-noise calculation. The formal scheme described above will be implemented explicitly on our enabling example of the topologically driven spin chain in Section V C.

V. NON-EQUILIBRIUM CYCLIC SPIN-CHAIN
This section focuses on the applications of the general formalism developed above to the model of topologically driven system of N classical spins, arranged in a circular chain. In the thermodynamic, N → ∞, limit the configuration space becomes infinite-dimensional, and the system can be viewed as a (1 + 1) stochastic field theory with the target space S 2 (see Fig. 1). The model has three parameters v, u, and κ that describe the relaxation rate, the rate of topological driving and the noise strength, respectively. As briefly discussed above, the relaxation term suppresses the short-range fluctuations, and, therefore, makes the model divergence-free in the thermodynamic limit. We are considering the weak-noise limit, κ ≪ v, |u|, whereas v and |u| can be comparable although such that |u|/v is not too large. The last requirement translates into the condition that the constant loop n(y) = n 0 solution constitutes a stable stationary point of the deterministic (zero noise) dynamics.
This Section is organized as follows. Subsection V A is devoted to formulation of the topological driving in terms of a multi-valued potential, referred to as the Wess-Zumino potential. We also briefly discuss the finite-dimensional (regularized) approximations for the infinite-dimensional field-theory configuration. Some details on the spin-chain regularizations are presented in Appendix A, where we argue that, starting with a large enough N , the relevant topological properties of the finite-dimensional approximations stabilize to their continuous limit counterpart. In Subsection V B we describe the instanton (optimal fluctuation) mechanism of the current generation and identify the structure of the instanton space M 0 ⊂ M that consists of all the configurations the optimal trajectories (instantons) pass through. Subsection V C contains the derivation of the main results concerning the spin-chain model. Here, we calculate the Cramér function of the topological current ω, generated in the system, by implementing the general procedure outlined in Section IV C. This is achieved by solving the relevant Fokker-Planck type equations equations, using an ansatz for the density ρ, current density J, and the vector potential A. The implemented ansatz is asymptotically exact in the weak-noise limit. The Cramér function S(ω) is derived for |ω| ≪ |v|(ln(|v|/κ)) −1 , i.e., in the instanton gas regime.
A. Wess-Zumino interpretation of the Circular Spin Chain Model Generally, a system described by Eq. (1) is not globally driven if the force field is given by an exact differential, i.e., F = −dV with (dV ) i = ∂ i V , where V is some scalar potential function. Although the force field form is not exact in the spin-chain model, it is still closed : dF = 0, with (dF ) ij = (1/2)(∂ i F j − ∂ j F i ), or, in other words, the force has zero curvature. Therefore, the deterministic force in Eq. (11) can be expressed as in terms of a multi-valued potential V W Z (n). Without a single-valued potential, the system is globally driven, and its stationary state can only be a non-equilibrium one, with a current being generated.
To determine the potential, consider some reference configuration n 0 ∈ M , e.g., a constant loop (a set of collinear spins) n 0 (y) = n 0 and for an arbitrary configuration n ∈ M represented by n(y) consider a path χ : [0, t] → M , represented by χ(y, s) with |χ(y, s)| = 1 along the path that connects n 0 to n, i.e., χ(0) = n 0 and χ(t) = n, or, equivalently, χ(y, 0) = n 0 and χ(y, t) = n(y). In the following we will skip the dependence on (y, τ ) when obvious. To derive the potential, we can simply integrate the force F along the path χ. According to the Stokes theorem, dF = 0 guarantees that we obtain the same potential if the paths χ and χ ′ used in the integration are topologically equivalent. Thus, we obtain the potential The "elastic" globally potential term V e (n), whose variation produces F e (n) in Eq. (11), enforces relaxation of the spin system to a y-uniform distribution (a constant loop). The second term ∝ ϕ B is topological and similar to the multi-valued Wess-Zumino action [1]. To avoid confusion we note the in this context we are not talking about a Wess-Zumino term in the action of our (1+1) field theory that would have originated from integration of a closed 3-form over a relevant 3-cycle. We rather interpret the potential in Eq. (55) as the action of a free particle, represented by V e (with y playing the role of time), with an additional multi-valued term ϕ B , obtained via integration of a closed 2-form over a relevant 2-cycle, as described by Eq. (56). The quantity ϕ B (n) is the area enclosed by the loop n(y).
More precisely, values ϕ B (n) calculated with help of two paths χ(y, s) and χ ′ (y, s) can differ by 4πm with integer m if the paths belong to different equivalence classes. The notation ϕ B indicates that it is the Berry phase [5] associated with the loop n(y) on a sphere. Indeed, the parallel transport of a tangent vector on the unit sphere along the loop n(y) rotates the vector by the angle equal to the area enclosed by n(y). The Berry phase appears in the related quantum-mechanical phenomenon: the state of the spin with the projection s along the magnetic field acquires a phase factor e isϕB when the direction of the slowly changing magnetic field makes one turn of the loop n(y). Finally we note that the purely topological nature of driving, i.e., dF = 0, in the continuous field-theory limit of the considered model can be violated by a regularization, represented by a (finite) 2N -dimensional system of N classical spins, arranged in a circular chain. Therefore, there is a question of how (and if at all possible) to regularize the second term in the expression for the driving force Eq. (11) to preserve the topological nature of driving on the regularized level. This can be achieved by implementing an approach based on Eq. (55). To define the topological term we note that in the thermodynamic limit N → ∞, the values of the neighboring spins are close, i.e., |n j+1 − n j | ≪ 1 and, therefore, we can uniquely connect n j to n j+1 with geodesic lines. This results in a piece-wise smooth loopñ(y) with the desired topological potential uϕ B (ñ). We provide some mathematical details of the regularization in Appendix A

B. Instantons and tubular neighborhoods
This Subsection contains a preliminary discussion of our strategy in dealing with the problem of weak noise. The approach consists in reducing our original model to an effective stochastic model on a circle, where the new reduced variable is the re-parameterized Berry phase θ(x) ∈ S 1 : The representation in Eq. (57) is possible and useful due to the instanton (optimal fluctuation) character of the current generation in this weak noise limit considered here. Then, a typical configuration is a closed loop on the sphere S 2 (also referred to, here and later on, as a "string") that is almost shrunk to a point performing a diffusive random walk over S 2 However, this typical diffusive meandering does not generate a current. Instead, the current is generated by rare events naturally occurring along the instanton trajectories illustrated in Fig. 1. The instanton trajectory is an optimal fluctuation as it has the highest probability (i.e., minimizes the Onsager-Machlup action) among the trajectories resulting in the transition. An instanton trajectory starts with a string, originally shrunk to a point, opening up into a "plane" circle configuration and then shrinking back to a point at the opposite end on the sphere. Such a fast and rare process generates a full cycle in the space of the re-parameterized Berry phase θ.
The first step of our computational strategy, detailed in the next Subsection, consists in adopting the instanton approximation to evaluation of the current density J. The approximation means that the non-equilibrium current density J obtained from Eqs. (41)- (43) is concentrated in the narrow tubes near the configurations passed by the optimal fluctuation trajectories, i.e., the configurations x represented by "plane" circles embedded into S 2 . The concept of tubes where the current density is localized was used, for example, in Refs. [11,12,24,25,39,43,57].
Let M 0 ⊂ M be the subspace of these configurations. We refer to this as the space of instanton configurations. For example, all four configurations shown in Fig. 1 belong to the instanton space M 0 . The instanton space M 0 has a simple structure that allows parametrization for the instanton as well as for a small neighborhood U curr ⊃ M 0 where the current is generated. First of all with a minimal abuse of notation we denote by ∂M 0 ⊂ M 0 the set of configurations x ∈ M 0 with θ(x) = 0, i.e., constant loops x(y) = n, parameterized by their positions n ∈ S 2 on the target sphere. Obviously, ∂M 0 ∼ = S 2 . Since ∂M 0 ⊂ M is a compact manifold embedded into the configuration space, it has a standard small tubular neighborhood U 0 ⊃ ∂M 0 , whose points (n, ξ) ∈ U 0 are parameterized by the position n on the sphere and the set ξ of transverse variables. We further show that M 0 \ ∂M 0 ∼ = SO(3) × (0, 2π) is an embedded 4-dimensional non-compact manifold, thus having a small tubular neighborhood U ⊃ M 0 \ ∂M 0 . This view suggests the following reparameterization of a "plane" circle x : S 1 → S 2 . Let e 3 be a unit vector, orthogonal to the circle plane, with the direction determined by the loop orientation, e.g., by ∂ y x(0). We denote by e 1 a unit vector in the direction from the circle center to its origin x(0), and set e 2 = [e 3 , e 1 ]. Then the oriented orthonormal basis set (e 1 , e 2 , e 3 ) represents an element g ∈ SO(3) of the orthogonal group. The fourth coordinate of x is its Berry phase θ(x) ∈ (0, 2π). The points of the corresponding tubular neighborhood are parameterized by (g, θ, ζ) with ζ representing the set of transverse variables. Obviously, U curr = U 0 U covers the instanton space M 0 .
One observes that the effective potential V 0 (θ) has two stationary points, θ = 0 and θ = θ 0 where F 0 (0) = F 0 (θ 0 ) = 0. The unstable point is characterized by The stable point θ = 0 can be approached along two directions corresponding to different loop orientations. In terms of θ ∈ (0, 2π) they correspond to θ → +0 and θ → 2π−0; in both cases ∂ θ F 0 < 0. These two stationary points correspond to saddle-point (θ = θ 0 ) and equilibrium (θ = 0) string configurations. The main instanton approximation, valid in the low-noise limit, means that only special instanton configurations, parameterized by θ and possibly accounting for some small fluctuations (these from a small neighborhood U ⊃ M 0 \ ∂M 0 ), will be relevant to the discussion below. We will make some additional (to the basic instanton approximation) assumptions limiting the domain of validity but also adding a required extra tractability in exchange. In the following we will discuss separately: (a) The socalled WKB approximation that ignores the terms associated with second-order derivatives over θ in comparison with the corresponding first-and zero-order terms. The WKB approximation is valid in the WKB domain where θ is sufficiently far away from the equilibrium and saddle points: θ, 2π − θ ≫ κ/k and |θ − θ 0 | ≫ κ/k 0 , respectively. The WKB region naturally splits into two sub-domains, 0 θ θ 0 and θ 0 θ 2π. (b) The harmonic/ linear-force approximation is valid in a relatively small vicinity of the saddle-point, |θ − θ 0 | ≪ 1, referred to as the harmonic region, where one can use the linear approximation for the force, F 0 (θ) ≈ k 0 (θ − θ 0 ). Similar to the WKB treatment in quantum mechanics, the WKB and harmonic regions do overlap. See Fig. 3 for illustration. The concrete form of the instaton for the spin-chain model in the harmonic and WKB domains will be derived (and matched) in Section V C and Appendix B. Finally we note that, as will be demonstrated in Section V C, detailed analysis in the harmonic region of the stable point θ = 0 can be avoided.

C. Derivation of the Cramér function
In this Subsection we apply the strategy, outlined in Subsection IV C, to the spin-chain model considered in the weak-noise limit also requiring that the topological currents are not too strong. As outlined in Subsection IV C, the vector potential A is characterized by the topological parameters given by Eq. (47). As demonstrated in Appendix A, for the spin-chain model H 1 (M ) ∼ = Z, i.e., there is only one topologically independent cycle s, which can be chosen to be restricted to the instanton space M 0 . The cycle s for such a choice is the one illustrated in Fig. (1) and corresponds to just a change of θ from 0 to 2π. The dual cycle α of codimension 1 can be chosen to be determined by the condition θ(x) = θ 0 , so that s and α intersect at the saddle point. The topological current for our model is single-component and will be denoted by ω. The topological parameter is also single-component, The four-step procedure for calculating S(ω) in the relevant for our application case dF = 0 of the topological driving, was outlined in Subsection IV C. Implementation of this procedure to the spin-chain model in the low-noise limit is facilitated by the following model-specific assumptions for the A, J, and ρ functions which can be verified directly once the solution, based on these assumptions, is found: (a) The vector potential A is essentially nonzero only within the sub-domain |θ − θ 0 | κ/k 0 , which is contained in the harmonic region of the saddle point. In this domain A does not depend on the transverse variable ζ, and its only substantially non-zero component, A θ , is along the θ variable.
(b) The eigenvalue λ is exponentially small and can be neglected in Eq. (49) everywhere except for a small vicinity of the equilibrium point θ = 0. In this sub-domain A is so small that it can be totally neglected. Moreover in the entire WKB region A is still small enough, so that the nonlinear term A 2 in Eq. (49) can also be neglected.
(d) The current density J is concentrated in a small tubular neighborhood of the instanton space M 0 , whose transverse size scales ∼ √ κ with the noise value. In the WKB and saddle-point harmonic regions the longitudinal component of J has a Gaussian dependence on ζ In the harmonic region of the saddle point this is the only non-zero component of J, and σ(θ) ≈ W (θ 0 ).
(e) The density distribution ρ is concentrated near the equilibrium θ = 0, where rare events generating the current can be neglected: The features of A, J, and ρ, listed above, are generic for a topologically driven system in the low-noise limit. SO(3) symmetry is an important special feature of our model. Therefore, the critical points are represented by isolated orbits of SO(3) rather than isolated points. Discussing "the" equilibrium θ = 0 and "the" saddle θ = θ 0 points in our model, what we actually mean is that we have two isolated orbits of SO(3) which represent the equilibrium and saddle points, respectively. These orbits are given by SO(3)/SO(2) ∼ = S 2 and SO(3), respectively. The symmetry gives rise to zero modes, which substantially complicates a straightforward path-integral calculation in the instanton approximation, especially due to the different numbers, 2 and 3, of zero modes at the equilibrium θ = 0 an transition θ = θ 0 configurations, respectively.
In our approach, the zero modes are allowed for automatically in a very simple way in the form of the volumes of the relevant orbits S 2 and SO(3) for the equilibrium and saddle configurations, respectively. 6 Properties (a)-(e) listed above allow us to ease computation of the Cramér function S(ω) essentially and in particular bypass complications associated with detailed resolution of the WKB domain. Therefore, in this Subsection we will rely on these properties, presenting justification details related to WKB calculations, as well as some technical details on the determinant calculations, in Appendix B 7 The material in the remaining part of the Subsection is split into paragraphs according to the four-step strategy described in Subsection IV C.

Step (i): Identifying the vector potential
In this Subsection we implement step (i). In the harmonic region |θ − θ 0 | ≪ 1, according to property (a), the vector potential A is described by the only non-zero component A θ that depends on θ only. We seek a solution in the representation of Eq. (44) with ρ − (θ) depending on θ only. According to property (b) we set λ = 0 in Eq. (45). Making use of Eq. (46) we arrive at the following homogeneous linear equation: whose general solution can be expressed in terms of the error function erf(z) = 2π −1/2 z 0 ds exp(−s 2 ): This results in the following expression for the θ-component of the vector potential: To determine the constant c we recast Eq. (63) as Z = exp( 2π 0 dθA θ /κ), which results in Eq. (68) shows that A peaks near θ 0 and decays in a Gaussian fashion as θ moves away from θ 0 . The solution presented in Appendix B 1 shows that the rapid decay continues with θ moving even further away from θ 0 inside the WKB domain.

Steps (ii) and (iii): Identifying the current-density and density distributions
The current density J does not have any special structure in the harmonic region in contrast to the distributions A and ρ. Therefore, on the step (ii), the solution of Eqs. (50) for J near the saddle point can be extrapolated from the WKB region (see Appendix B 2).
Step (iii) starts with solving the first equation in Eqs. (51). This is an easy task, since Eq. (51), being restricted to any 1-dimensional subspace, becomes a linear first-order ordinary differential equation with a right hand side. On the cycle s that belongs to the instanton space, the density ρ is represented by a function ̺(θ), and the linear equation adopts a form The 1-dimensional linear boundary problem, defined for 0 ≤ θ ≤ 2π and represented by Eq. (70), can be solved in a standard way [39] by using a representation Substituting Eq. (71) into Eq. (70) one arrives at where we have introduced the barriers Close to the saddle-point configuration, q depends only on θ, and the only substantially nonzero component of the current density J is where σ = W (θ 0 ) and J 0 is constant on the length scale κ/k 0 , according to the property (d).
Integration of Eq. (72) results in which translates with the help of Eq. (68) into where c = (1 − Z)/(1 + Z). One observes from Eq. (76) that q(θ) is localized at |θ − θ 0 | κ/k 0 , thus justifying the approximations used so far to evaluate A θ and J θ . Setting θ = 2π in Eq. (76) and applying the boundary condition from Eq. (72), one expresses J 0 in terms of Z and ρ 0 : To complete the major step (iii) we apply the normalization condition, given by the second relation in Eq. (51), to find the normalization constant ρ 0 . We consider the neighborhood U 0 represented by the most probable configurations that are close to constant loops. Stated differently, the density given by Eq. (65) is concentrated in the harmonic region of the stable point and hence adopts a form: where n ∈ S 2 is the center of a small loop, and the matrix γ determines a harmonic expansion of V W Z (x) in terms of nonzero modes ξ. Then the normalization condition becomes thus leading to the following value of ρ 0 (see Appendix B 3 for more details): Note that due to the symmetry of the model dµ(n) is an SO(3)-invariant measure on the sphere, defined up to a multiplicative factor. This factor has been identified in a standard way by considering the two zero modes on the sphere (see Appendix B 3 for some detail). The determinant det γ includes (2N − 2) positive eigenvalues of the discretized operator γ.

3.
Step (iv): Finding the Cramér function for the topological current Step (iv) starts with evaluating the integral (52) for the Cramér function S in terms of Z. According to the property (d) the integral acquires its major contribution from the vicinity of the saddle-point configuration. Indeed, the integrand decays as ∝ exp((2/κ)V 0 (θ)) with θ deviating from θ 0 inside the WKB domains, where Eqs. (68), (69), (71) and (76) can be used. The dependence of ρ on the transverse variables in the relevant region is given by ρ(x) = ̺(θ) exp(−κ −1 σζ ⊗ ζ) with σ = W (θ 0 ), which follows from Eq. (51) applied in the transverse direction as well as from the asymptotic absence of the transverse components of A and J in the relevant region.
Thus, we obtain the following expression for the Cramér function: The integral over θ can be calculated similarly to that in Eq. (75) whereas the calculation of the other integrals is presented in Appendix B 3: The integral over the space SO(3) of the zero modes is computed explicitly: where the invariant measure dµ θ0 (g) in SO (3), taking into account three zero modes produced by infinitesimal changes of g, requires careful evaluation of the multiplicative factor. This is performed in a standard way by considering the scalar products of these modes (see Appendix B 3 for some detail).
To conclude the step (iv) we need to relate the topological current ω to the topological parameter Z by applying the second relation in Eq. (52). Let us reiterate that we have chosen the cycle α by the condition θ(x) = θ 0 , so that we have for the current which results in After calculating the Gaussian integral in Eq. (85) over (2N − 4) modes ζ with positive eigenvalues at the saddle point (cf. Eq. (81)), one derives We combine Eqs. (80), (77) and (86) to get the topological current in terms of Z: This equation has a form where the newly introduced quantities can be interpreted as the transition rates in the auxiliary Markov chain model discussed in detail in the next Subsection V C 4. The stationary current can be obtained by setting Z = 1. The final expression of Z via ω follows from Eq. (88) (the choice of the root is related to the model equivalence discussed in Appendix C): We complete the derivation of the Cramér function by providing the relation to the parameters of the spin-chain model v and u. The ratio of the determinants can be calculated in the limit N ≫ 1 (see Appendix B 3 for details): The final expression for the Cramér function is where κ ± are expressed through v and u with the help of Eqs.
The eigenvalue λ can be calculated by comparing the two representations of the Cramér function: or in terms of ω, The equivalence of the spin-chain model at moderate topological currents to the two-channel single-state Markov chain model is, in particular, obvious from the forms of Eqs. (90), (94), and (95). We see that λ can indeed be neglected if the total current is not exponentially larger than the equilibrium current.

VI. SUMMARY AND CONCLUSIONS
Let us briefly summarize main steps, results of the general approach and the model discussed in the manuscript. We have developed here a topological picture of generated stochastic currents, where each current component is associated with a topologically nontrivial 1-cycle in the system configuration space, so that the current ω ∈ H 1 (M ; R) resides in the first homology of the configuration space with real coefficients. The current, defined in a topological way as the set of number of rotations over the independent cycles per unit time, is related to the current density J via the Poincaré duality H 1 (M ; R) ∼ = H m−1 (M ; R), where the cohomology is considered in the de Rahm representation. ( See. e.g., [32] for review of the de Rahm cohomology.) By considering the current density J as a closed form of rank (m − 1), the current is viewed ω = [J] as its cohomology class. This allows the Cramér function S(ω) of the long-time current distribution to be calculated by applying the variational principle to the current-density functional S(J, ρ). The explicit form of S(J, ρ) together with the variational principle and an intuitive path-integral base derivation is also presented in the manuscript.
We further focused on the case of topological driving, when the driving force is locally potential, dF = 0. Even though the system may not be represented by a potential function due to presence of topologically nontrivial cycles, it still allows description in terms of a multi-valued potential F = −dV W Z , referred to as a Wess-Zumino potential, due to it close resemblance with multi-valued Wess-Zumino actions well-known in quantum field theory. By applying the variational principle to the calculation of the Cramér function S(ω) we derived a system of equations for ρ, J, and A, the latter being an auxiliary curvature-free (dA = 0) gauge field. We also developed a procedure of solving the aforementioned equations step-by-step, resulting in the well defined algorithm for calculating the Cramér function S(ω) of the topological current.
To illustrate the general approach we considered a circular spin-chain stochastic model with topological driving that constitutes a regularized version of a (1 + 1) stochastic field theory. The model represents Langevin dynamics of an elastic string evolving over a two-dimensional sphere S 2 . Despite of its high intrinsic dimensionality the problem appears tractable as it has only one independent topologically nontrivial cycle, H 1 (M ; R) ∼ = R, which reflects the well-known result on the homology of the loop spaces of spheres. In the low-noise limit we have solved aforementioned variational equations for ρ, J, and A explicitly. The solvability became possible via proper use of the rare-event, instanton analysis of the current generation. Moreover, the actual calculations are streamlined even further, as in fact we do not perform the path-integral calculations around the instanton solutions explicitly, but rather use the instanton scenario to build an asymptotically exact ansatz for (ρ, J, A). This useful technical trick allows us to solve the equations (in the proper low noise and large deviation limit) analytically. In particular, we have found that the current density J, generating the topological current ω, is concentrated in a small tubular neighborhood of the finite-dimensional space M 0 ⊂ M of instanton configuration, and it shows a Gaussian dependence on the set ζ of the transverse variables. Technically, this approach can be viewed as an extension of the equilibrium techniques based on current tubes [11,12,24,25,39,43,57] to the non-equilibrium problem of evaluating the Cramér functions of generated stochastic currents. It is instructive to note that, although the relevant distributions are concentrated in a small tubular neighborhood of the whole instanton space M 0 , the calculation of S(ω) requires careful consideration of a small neighborhood of the saddle point (transition state) only. This reflects the fact that, during a rare event that contributes to the current generation, the system spends most of the time around the saddle point, being thrown there by a strong fluctuation of noise and waiting for a small extra kick that starts its unavoidable fall-down back to the steady state. Most of the time the spin-chain is involved in a "boring", i.e. typical, diffusive meandering along the sphere, thus waiting (almost forever) for the next instanton jump/transition. This scenario allows us to reduce the complex stochastic field theory to a simple Markov chain model. This asymptotic (low-noise, instanton) reduction of a continuous stochastic system to a simple Markov chain model in the case of moderate non-equilibrium currents is quite a general result. In the case of a purely potential force F = −dV it is connected to the topological properties of the potential and closely related to the Morse theory [34]. A connection between the Morse theory and instantons was established in [61], where a super-symmetric imaginary-time quantum mechanics has been introduced with the effective potential V eff = (dV ) 2 . In the semiclassical limit → 0 the instanton approach has been implemented to evaluate the effects of tunneling between the metastable states, thus allowing us to distinguish between the true zero modes, which contribute to the de Rahm cohomology [32,44] and hence describe the topological invariants of the configuration space, and just soft modes with exponentially vanishing eigenvalues in the → 0 limit. This approach is known as the Morse-Witten (MW) theory [61]. It is well known [37] that a simple gauge transformation turns the Fokker-Planck (FP) operator into the Schrödinger operator in the potential V eff , with 2 representing the temperature in the FP theory. Within this equivalence the instantons have the same shape, although in the FP picture they play the role of optimal fluctuations that minimize the Onsager-Machlup action for rare stochastic transitions between the metastable states. The eigenvalues of the soft modes, describing tunneling in the MW theory, attain a true physical meaning in the FP picture, since they represent the slowest relaxation rates, which are due to rare over-the-barrier transitions. Such an approach has been utilized by Tanase-Nicola and Kurchan [57] who studied a supper-symmetric FP theory that extends the standard FP dynamics in the same way as the super-symmetric quantum mechanics extends standard quantum mechanics.
At this point we note that the standard Morse theory describes the case of a purely potential force, whereas for our spin-chain model the force dF = 0 is only locally potential. The topological counterpart of stochastic dynamics in this situation is known as the Morse-Novikov (MN) theory that has demonstrated its capabilities to study topological properties of the underlying configuration space [47]. It is worth noting that in the continuous limit the multi-valued potential V W Z (n) of our spin-chain describes the multi-valued action of a free particle moving along the sphere S 2 in a magnetic field of a constant curvature. If the particle motion is affected additionally to the magnetic field by a non-zero potential, the problem, which can be mapped onto the Kirchhoff equations, can be handled using the MN theory [47]. In a generic situation the instanton space M 0 is one-dimensional and is represented by the unstable spaces of the isolated critical points of Morse index 1 (one unstable mode). The spin-chain model, considered in this manuscript, whose continuous limit corresponds to the Kirchhoff problem with the zero potential, is degenerate due to its intrinsic SO(3) symmetry, restored when the potential vanishes. In terms of the Morse theory this degeneracy means that the critical points, which are isolated in the case of standard Morse (including MN) theory are replaced by isolated critical manifolds associated with the orbits of the underlying symmetry group, SO(3) in our case. Such a situation, in the potential force case is described by the so-called equivariant Morse-Bott (MB) theory [10]. Therefore, the topological counterpart of the low-noise stochastic dynamics for our spin-chain model can be referred to as a case of the equivariant Morse-Bott-Novikov (MBN) theory. Stated in the stochastic dynamics terms, the instanton space is represented by a 1-dimensional family of the SO(3) orbits, actually SO(3) itself, almost everywhere. Then only the stable points (constant loops) are represented by an orbit from S 2 ∼ = SO(3)/SO (2). However, and in spite of this degeneracy, we have just showed that this collapse of the orbits at the stable critical points is not an obstruction for the general Cramér function calculations. Let us also emphasize that even though traditionally the standard (equivariant) Morse theory was developed primarily for the case of a potential force, we found out that in fact it can be efficiently used in the stochastic dynamics aspect in the case of moderate topological driving, when the Morse function is multivalued. As we just demonstrated on the example of the non-equilibrium spin-chain, moderate character of the driving does not change the topological structure of the critical and instanton manifolds in comparison with the pure potential case.
In a generic non-equivariant case with moderate topological driving one could expect a full reduction of the lownoise stochastic dynamics to a Markov chain process on a graph whose nodes and links represent the critical points of Morse index 0 and the unstable manifolds of the critical points of Morse index one, respectively. This is really the case when the potential function satisfies the Morse-Smale (MS) condition [34], which would be a generic situation. If the MS condition is not satisfied (which is some kind of degeneracy) the stochastic dynamics of the current generation can show some additional interesting features, which are yet to be analyzed. In the case dF = 0 of intrinsically nonpotential force, whose topological counterpart is represented by Morse decompositions in the Conley index theory [17], stochastic dynamics can be extremely complicated, with the critical spaces, represented by neither isolated points nor even isolated manifolds but rather some closed sets, possibly of fractal nature. Even in the simplest non-equivariant case of isolated critical points, the situation is much more complicated (than in the equivariant case), yet apparently treatable. The difficulty is that transitions between different isolated states of the effective Markov chain become direction-dependent, since as opposed to the potential and locally-potential cases (with isolated critical points) the instanton trajectories that correspond to climbing the barrier and falling down the barrier are different. The problem of computing the pre-exponential factors in this case also becomes much more involved and less universal.
Let us also stress that in the v = 0 case the Onsager-Machlup action of the spin-chain model in the thermodynamic field theoretic limit, N → ∞, reproduces the action of a (1 + 1) sigma-model with the topological term. However, in the regularized model (finite N ) the relative fluctuations in the v = 0 case are strong, so that n j+1 is typically not close to n j . The corresponding string on the sphere is not continuous, which can be viewed as the main reason for complexity of the sigma-model, considered as a field theory. The elastic term proportional to v suppresses the relative fluctuations in such a dramatic way that statistically n j+1 and n j are always close to each other. Therefore, the configurations can be viewed as continuous loops in S 2 even for a finite large N , which creates a topologically nontrivial cycle. This interesting peculiarity of the problem gives rise to generation of the single component stochastic current. We also note that since in the v = 0 case and N → ∞ the result is finite, the elastic term in the case of small v can be interpreted as a regularization of the sigma-model based stochastic field theory suppressing the short-range fluctuations and eliminating divergences.
The methodology for the LDP of empirical currents, developed in this manuscript, is closely related to the FP approach to MW theory developed by Tanase-Nicola and Kurchan [57]. In a way, this methodology can be interpreted as an extension of the approach of [57] to the locally potential driving case dF = 0, implemented in low-dimensional 0-and 1-fermion sectors that correspond to the density and current density distributions, respectively, and applied to large-time statistics of empirical currents. Thus, we believe that our weak noise analysis of currents in the problems with topological driving can be restated in super-symmetric terms of [57]. Testing this conjecture remains a future challenge. It would also be interesting to extend the above relation to higher dimensions, e.g., by treating diffusion in n-fermion sector as noisy dynamics of n-dimensional chains that produces higher dimensional currents, residing in H n+1 (M ; R). Based on the presented in the manuscript low-dimensional results, it appears that the low-noise limit of the Cramér functions of the empirical currents (including the higher-dimensional counterparts) contains detailed information on the Morse decomposition of the underlying space M .
Finally, we have considered the simplest stochastic (1 + 1) sigma model with the target space represented by S 2 ∼ = CP 1 . A simple topological computation demonstrates that a generalization based on the target spaces CP n with n > 1 still provide a single component topological current. The simplest generalization resulting in the multi-component topological currents ω requires the target space to be a complex flag space [32,44]. The Cramér function S(ω) can be computed in such cases straightforwardly and without any significant complications, by using the methodology explained above. or, equivalently, We further substitute ψ(x) given by Eq. (B3) in the equation Lψ(x) = 0, retain only the leading terms in κ, and keep in mind that typically |ζ| ∼ √ κ. Overall this results in the following system of equations: Combining the two Eqs. (B5) one derives The second equation in Eqs. (B6) is nonlinear, and thus intractable, if the matrix is large. However, one can still show that this equation does have a solution with the following important property, σ(θ) = W (θ) for θ = 0, θ 0 , 2π. To demonstrate this property one refers to a dynamical equations with respect to some proper time τ (B7) This dynamical system has three critical points (θ, W (θ)) with θ = 0, θ 0 , 2π, where θ = 0, 2π correspond to stable critical points, while θ = θ 0 describes an unstable critical point (∂ θ F 0 (θ 0 ) > 0). Therefore, finding a solution with the desired properties is equivalent to identifying two solutions of Eq. (B7) which start at the unstable point and reach the two stable points in infinite time. Generally such trajectories do exist. For our spin-chain model it can be demonstrated in a straightforward manner, e.g., by using the angular-momentum representation for the transverse modes ψ a j (y; θ) entering Eq. (58). The first equation in Eqs. (B6) can be easily solved: thus immediately providing expressions for A θ , via Eqs. (B2) and (B4). Therefore, the WKB solution for A θ that matches with the harmonic solution (68) within the domains where both apply, has the following form in the two distinct sub-domains: The expressions for the transverse components A j of the vector potential can also be derived straightforwardly.

Current tubes in the WKB region
In this Subsection we determine the current density distribution J. To achieve this goal we solve Eq. (50) assuming that J is concentrated in a small neighborhood of the instanton space M 0 .
In the WKB region we can set A = 0 in the first equation in Eqs. (50), and since the region does not contain topologically nontrivial 1-cycles, the first equation is equivalent to J = (κ/2)dϕ − F ϕ for some function ϕ(x). Substituting this representation into the second equation of Eqs. (50) one arrives at the following system of equations for J In the low-noise limit the current is generated by rare events, and during the transition the system experiences small Gaussian fluctuations around the instanton trajectories. Therefore, the current density J is concentrated in a small tubular neighborhood U curr ⊃ M 0 of the instanton manifold M 0 where its longitudinal current component should have a Gaussian dependence on the transverse variables ζ. To verify this property we seek the solution of Eq. (B11) in a form We substitute the ansatz of Eq. (B12) into Eq. (B11) and apply the same strategy as used earlier in Section B 1 in the context of deriving Eqs. (B5) and (B6). This results in the following system of equations Since the second relation in Eqs. (B6) and (B13) are identical, using the same notation σ for the variances in Eqs. (B3) and (B12) is perfectly legitimate. Solving the first equation in Eq. (B13), further substituting the obvious solution into Eq. (B11), and keeping the leading terms in √ κ in the way detailed in Section B 1, we arrive at the following expression for the current density J in the WKB region: Careful examination of the second equation in Eqs. (B13) in the harmonic region of the saddle point and allowing for the properties of the solution described at the end of Section B 1 show that σ − (θ) = σ(θ) − W (θ) tends to zero, when θ approaches θ 0 , as ∼ (θ − θ 0 ) 2 . Therefore, the transverse components J j vanish in the harmonic region. This confirms the assumption we have made in Section (V C), referred to there as the property (d).
At this point we note that the current distribution J, given by Eq. (B14) derived for the WKB region, also extends nicely into the harmonic region of the saddle point θ = θ 0 , thus suggesting that J in this region is also described by Eq. (B14). This can be verified directly. The reason why the WKB solution easily extrapolates into the harmonic region is related to the asymptotically longitudinal nature of the vector potential (A j = 0) in the harmonic region of the saddle point.

Computation of the relevant determinants
In this Section we present some details of the functional integral calculation in Eqs. (79), (81), and (84). In Eq. (79) the integration is performed over the deviations from the stable constant loop, whereas both in Eq. (81) and Eq. (84) the integral runs over the transverse deviations from the saddle-point loop. In the following calculation, as in the main text, both the density ρ and the current density J are assumed regularized on a lattice of N spins, in accordance with discussion of Appendix A. Therefore, the functional integrals should be represented by finite-dimensional integrals over N positions n j on the unit sphere. Since we will see that only long-wavelength deviations from the constant and saddle-point loops contribute to the ratio of the two integrals of interest, we will simply execute the limit N → ∞ in all the intermediate expressions where it exists.
The operator σ has a negative mode (σ 0,− = −4k 0 ≡ −2πv(1 − u 2 /v 2 )) related to the longitudinal deviation as Finally, after excluding the integration over the negative mode by introducing the δ-function δ(2c 0,− / √ N ) in the full normal-mode integral, we obtain the integral over the transverse deviations from the saddle-point configuration in the following form: where the determinant det σ includes 2(N − 2) positive eigenvalues of σ, or equivalently, all eigenvalues of W (θ 0 ). Now we are in a position to calculate the ratio of the integrals: dµ θ0 (g) = 2π 2 (1 + u 2 /v 2 ) 1 − u 2 /v 2 , which, in contrast to the individual integrals and determinants, is N -independent in the N → ∞ limit. Indeed, we note that the knowledge of the lowest eigenvalues with q ≪ N , specified in Eqs. (B17) and (B24), allows us to calculate the ratio of the determinants by re-grouping the factors det σ/ det γ = (1/σ 1,+ ) (N −1)/2 q=2 γ qγq / (σ q,+ σ q,− ) .
The transformation is legitimate because γ qγq / (σ q,+ σ q,− ) approaches unity sufficiently fast as q increases if q ≪ N and N → ∞. Then the upper limit of the product can be extended to infinity. In the meantime, the Weierstrass factorization theorem [18] for the representation of an entire function as an infinite product leads to the following identity In this Appendix we re-derive the statistics of the current working with the simple stochastic model consisting only of one site linked to itself by an edge, with jump rates κ + and κ − in the positive and negative directions, respectively. This simple model, represented in Fig. 4, describes a continuous time random walk [37], and reflects the instanton mechanism of the current generation of our spin-chain model in the weak-noise limit.
To study the statistics of the jump rate one introduces counting stochastic process [33] c(η) that measures the difference of jump counts in the positive and negative directions (which is similar to the definition in Eq. (7)). Its value increases by w j = ±1 at the jump j if a jump occurs in the positive or negative direction, respectively: We are interested in the statistics of the empirical current ω, i.e., the number of jumps per unit time c(η)/t. The probability of having ωt jumps during time t is given by the discrete distribution where δ is the Kronecker symbol, and the angular brackets denote the average over stochastic trajectories. This average is determined by the Markovian measure Dη exp (−S(η)), where Dη = n dτ 1 . . . dτ n and the action reads exp (−S(η)) = n j=1 κ wj e −(κ++κ−)t , with κ ±1 = κ ± being the jump rates. The generating function e −c(η) ln Z of the distribution P (ω, t) can be calculated using the standard procedure, e.g. described in [31]: where is the only eigenvalue of the biased 1 × 1 transition "matrix", obtained by replacing the jump rates as κ + → Z −1 κ + and κ − → Zκ − , while keeping the overall escape rate equal to (κ + + κ − ).
Although the distribution can be obtained exactly in terms of the modified Bessel function, to derive the Cramér function S(ω) = lim t→∞ t −1 ln P (ω, t) we only need to calculate the integral in Eq. (C2) within the saddle-point approximation. Thus, one derives where Z is expressed in terms of ω by means of the saddle-point equation with λ(Z) specified in Eq. (C5). The resulting quadratic equation for Z has two real solutions of opposite signs. The positive solution should be chosen since it corresponds to the minimum of S over the integration contour. The expressions presented above provide a link between the spin-chain model in the weak noise limit and the single-state Markov chain.