*arg min *arg max

# Steady-state thermodynamics for population dynamics in fluctuating
environments with side information

Hideyuki Miyahara<EMAIL_ADDRESS><EMAIL_ADDRESS>Department of
Electrical and Computer Engineering,
Henry Samueli School of Engineering and Applied Science,
University of California, Los Angeles, California 90095

###### Abstract

Steady-state thermodynamics (SST) is a relatively newly emerging subfield of
physics, which deals with transitions between steady states. In this paper, we
find an SST-like structure in population dynamics of organisms that can sense
their fluctuating environments. As heat is divided into two parts in SST, we
decompose population growth into two parts: housekeeping growth and excess
growth. Then, we derive the Clausius equality and inequality for excess
growth. Using numerical simulations, we demonstrate how the Clausius
inequality behaves depending on the magnitude of noise and strategies that
organisms employ. Finally, we discuss the novelty of our findings and compare
them with a previous study.

††preprint: APS/123-QED

##  I Introduction

Thermodynamics is one of the most important subfields of physics and provides
the foundation for other subfields in physics. Furthermore, the last two
decades have witnessed novel developments in thermodynamics: stochastic
thermodynamics and steady-state thermodynamics (SST). In stochastic
thermodynamics, Jarzynski’s equality and Crooks’ theorem succeed in unifying
the second law of thermodynamics and linear response theory [1, 2, 3, 4, 5],
and they are generalized from the viewpoint of information theory [6, 7, 8, 9,
10, 11]. On the other hand, in SST, which deals with transitions between non-
equilibrium steady states, the Clausius equality and inequality for excess
heat during transitions between non-equilibrium steady states were found [12,
13, 14, 15, 16, 17, 18, 19, 20].

In theoretical biology, population dynamics, which involves the study of the
dynamics of the number of individuals and organisms, is a particularly
important topic. In particular, population dynamics of organisms that switch
their phenotypes stochastically has attracted much attention and has been
investigated extensively because it is quite essential to understand how
organisms adapt to and survive their fluctuating environments [21, 22, 23, 24,
25, 26, 27]. Recently, population dynamics and thermodynamics have been
integrated, and interdisciplinary research between population dynamics and
thermodynamics has witnessed some novel findings. For example, FRs for
population dynamics were found [28, 29, 30, 31]. Furthermore, an SST-like
structure was found for a biological system [32, 33, 34].

In this paper, we construct an SST-like structure for population dynamics of
organisms that can sense their environments. As mentioned above, an SST-like
structure for population dynamics was investigated in Ref. [32], but only a
fixed transition matrix was considered. Furthermore, this previous work
assumed that organisms cannot sense their environment. When we consider the
adaption of organisms to their environments, the ability of sensing
environments is critical and must be taken into account. Then, we extend the
work by introducing information on environments and derive new relations for
population dynamics.

This paper is organized as follows. In Sec. II, we explain a system of
interest and define some important quantities. In Sec. III, we describe the
main results of this paper. In Secs. IV and V, we provide the proofs of the
main results. Then, in Sec. VI, we perform numerical simulations to confirm
the findings. In Sec. VII, we discuss the main results by comparing them with
a trivial bound and the finding in Ref. [32]. Section VIII concludes this
paper.

##  II Prerequisites

In this section, we first define some variables that characterize population
dynamics and some quantities that play a critical role in developing an SST-
like structure for population dynamics. We also define steady states and two
types of population growth: housekeeping growth and excess growth.

###  II.1 System variables

We consider organisms with $n$ phenotypes and assume that phenotype-switching
and duplication occur at discrete time $\tau=1,2,\dots,t$. To describe it
mathematically, let us introduce three variables: $N_{\tau}(x)$, $y_{\tau}$,
and $z_{\tau}$ for $x=1,2,\dots,n$ and $\tau=1,2,\dots,t$. Here $N_{\tau}(x)$
is the number of organisms of phenotype $x$ at time $\tau$, $y_{\tau}$ is the
state of the environment at time $\tau$, and $z_{\tau}$ represents information
on $y_{\tau}$. Furthermore, we assume that organisms do not know $y_{\tau}$
but may utilize $z_{\tau}$ as information on $y_{\tau}$. In addition, we
impose the following relations: $N_{\tau}(x)\geq 0$ for $x=1,2,\dots,n$ and
$\tau=1,2,\dots,t$. We also define
$\vec{N}_{\tau}\coloneqq[N_{\tau}(1),N_{\tau}(2),\dots,N_{\tau}(n)]^{\intercal}$.

###  II.2 Dynamics and detailed balance condition

We now describe the system of interest that is composed of two terms:
phenotype-switching and population growth. We provide two mathematical
expressions of the target system: the stochastic equation and its matrix form
since they are both helpful.

####  II.2.1 Dynamics in the stochastic equation

In this paper, we consider the system governed by

$\displaystyle N_{\tau}(x)$
$\displaystyle=\mu_{y_{\tau}}(x)\sum_{x^{\prime}=1}^{n}T_{z_{\tau}}(x|x^{\prime})N_{\tau-1}(x^{\prime}),$
(II.2.1)

where $T_{z}(x|x^{\prime})$ represents the phenotype-switching rate from
phenotype $x^{\prime}$ to phenotype $x$ in the case of $z$ and $\mu_{y}(x)$ is
the duplication rate of organisms whose phenotype is $x$ when the state of the
environment is $y$. Thus, $T_{z}(\cdot|\cdot)$ satisfies
$\sum_{x=1}^{n}T_{z}(x|x^{\prime})=1$. Each organism changes its phenotype by
$T_{z}(\cdot|\cdot)$ in Eq. (II.2.1) typically to maximize its total
population.

We assume that $T_{z}(\cdot|\cdot)$ satisfies the detailed balance condition

$\displaystyle T_{z}(x|x^{\prime})w_{z}^{T}(x^{\prime})$
$\displaystyle=T_{z}(x^{\prime}|x)w_{z}^{T}(x),$ (II.2.2)

where $w_{z}^{T}(x)$ is the stationary distribution induced by
$T_{z}(\cdot|\cdot)$. The detailed balance condition is originally an
assumption widely used in thermodynamics; otherwise, we cannot define
thermodynamic quantities of the system. We also define

$\displaystyle H_{y,z}(x|x^{\prime})\coloneqq\mu_{y}(x)T_{z}(x|x^{\prime}),$
(II.2.3)

for $x,x^{\prime}=1,2,\dots,n$.

####  II.2.2 Dynamics in the matrix form

We provide a matrix expression of the dynamics defined in Sec. II.2.1. That
is, we rewrite Eq. (II.2.1) as

$\displaystyle\vec{N}_{t}$
$\displaystyle=\hat{M}_{y_{t}}\hat{T}_{z_{t}}\vec{N}_{t-1},$ (II.2.4)

where $\hat{M}_{y}$ and $\hat{T}_{z}$ are the $n\times n$ matrices given,
respectively, by

$\displaystyle\hat{M}_{y}$
$\displaystyle\coloneqq\mathrm{diag}[\mu_{y}(1),\mu_{y}(2),\dots,\mu_{y}(n)],$
(II.2.5) $\displaystyle\hat{T}_{z}$
$\displaystyle\coloneqq\begin{bmatrix}T_{z}(1|1)&T_{z}(1|2)&\dots&T_{z}(1|n)\\\
T_{z}(2|1)&T_{z}(2|2)&\dots&T_{z}(2|n)\\\ \vdots&\vdots&\ddots&\vdots\\\
T_{z}(n|1)&T_{z}(n|2)&\dots&T_{z}(n|n)\end{bmatrix}.$ (II.2.6)

From Eq. (II.2.4), we also have

$\displaystyle\vec{N}_{t}$
$\displaystyle=\bigg{[}\prod_{\tau=1}^{t}\hat{M}_{y_{\tau}}\hat{T}_{z_{\tau}}\bigg{]}\vec{N}_{0}.$
(II.2.7)

Similarly, the matrix representation of Eq. (II.2.3) is also introduced as

$\displaystyle\hat{H}_{y,z}$ $\displaystyle\coloneqq\hat{M}_{y}\hat{T}_{z}.$
(II.2.8)

Note that $[\hat{H}_{y,z}]_{x,x^{\prime}}=H_{y,z}(x|x^{\prime})$ where
$[\cdot]_{x,x^{\prime}}$ is an element in the $x$-th row and the
$x^{\prime}$-th column of the matrix.

###  II.3 Population growth

Population growth is of great importance in population dynamics; we here
introduce it by

$\displaystyle\Phi_{0\to t}\coloneqq$ $\displaystyle\ln\frac{N_{t}}{N_{0}},$
(II.3.1)

where $N_{\tau}\coloneqq\sum_{x=1}^{n}N_{\tau}(x)$ is the total number of
organisms at time $\tau$. We also define
$\phi_{\tau}\coloneqq\ln\frac{N_{\tau}}{N_{\tau-1}}$; so we have $\Phi_{0\to
t}=\sum_{\tau=0}^{t}\phi_{\tau}$.

###  II.4 Steady states

We introduce steady states, which play a critical role in SST. When $y_{\tau}$
and $z_{\tau}$ are fixed or vary sufficiently slowly, $\phi_{\tau}$ reaches a
steady state labeled by $y_{\tau}$ and $z_{\tau}$. The above situation
corresponds to a quasi-static process in thermodynamics, and thus it is of
great importance.

Let us denote the normalized steady state by
$\vec{v}_{y,z}^{\mathrm{st}}\coloneqq[v_{y,z}^{\mathrm{st}}(1),v_{y,z}^{\mathrm{st}}(2),\dots,v_{y,z}^{\mathrm{st}}(n)]^{\intercal}$.
In the case of $y_{\tau}=y$ and $z_{\tau}=z$, $\vec{v}_{y,z}^{\mathrm{st}}$
satisfies

$\displaystyle v_{y,z}^{\mathrm{st}}(x)$
$\displaystyle=e^{-\phi_{y,z}^{\mathrm{st}}}\mu_{y}(x)\sum_{x^{\prime}=1}^{n}T_{z}(x|x^{\prime})v_{y,z}^{\mathrm{st}}(x^{\prime}),$
(II.4.1)

where $\phi_{y,z}^{\mathrm{st}}$ is $\phi_{\tau}$ in the case of the steady
state labeled by $y$ and $z$. Note that $\vec{v}_{y,z}^{\mathrm{st}}$ is
normalized such that $\|\vec{v}_{y,z}^{\mathrm{st}}\|_{1}=1$, while
$\vec{N}_{\tau}$ is not; thus, at a steady state, we have
$\vec{v}_{y_{\tau},z_{\tau}}^{\mathrm{st}}=\vec{N}_{\tau}/N_{\tau}$.
Mathematically, steady-state population growth per time step is given by

$\displaystyle\phi_{y,z}^{\mathrm{st}}$
$\displaystyle=\ln\sum_{x,x^{\prime}=1}^{n}u_{y,z}^{\mathrm{st}}(x)\mu_{y}(x)T_{z}(x|x^{\prime})v_{y,z}^{\mathrm{st}}(x^{\prime}),$
(II.4.2)

where
$\vec{u}_{y,z}^{\mathrm{st}}\coloneqq\big{[}u_{y,z}^{\mathrm{st}}(1),u_{y,z}^{\mathrm{st}}(2),\dots,u_{y,z}^{\mathrm{st}}(n)\big{]}$
is the dual eigenvector of $\vec{v}_{y,z}^{\mathrm{st}}$ that satisfies
$\vec{u}_{y,z}^{\mathrm{st}}\vec{v}_{y,z}^{\mathrm{st}}=\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)v_{y,z}^{\mathrm{st}}(x)=1$.

###  II.5 Eigenstates

We define the left eigenvectors
$\\{\vec{u}_{y,z}^{\mathrm{eig}}(x)\\}_{x=1}^{n}$ and right eigenvectors
$\\{\vec{v}_{y,z}^{\mathrm{eig}}(x)\\}_{x=1}^{n}$ of $\ln\hat{H}_{y,z}$. Then,
$\\{\vec{u}_{y,z}^{\mathrm{eig}}(x)\\}_{x=1}^{n}$ and
$\\{\vec{v}_{y,z}^{\mathrm{eig}}(x)\\}_{x=1}^{n}$ of $\ln\hat{H}_{y,z}$
satisfy, respectively,

$\displaystyle\vec{u}_{y,z}^{\mathrm{eig}}(x)\ln\hat{H}_{y,z}$
$\displaystyle=\phi_{y,z}^{\mathrm{eig}}(x)\vec{u}_{y,z}^{\mathrm{eig}}(x),$
(II.5.1) $\displaystyle\ln\hat{H}_{y,z}\vec{v}_{y,z}^{\mathrm{eig}}(x)$
$\displaystyle=\phi_{y,z}^{\mathrm{eig}}(x)\vec{v}_{y,z}^{\mathrm{eig}}(x),$
(II.5.2)

where the elements of $\vec{v}_{y,z}^{\mathrm{eig}}(x)$ and
$\vec{u}_{y,z}^{\mathrm{eig}}(x)$ are nonnegative,
$\|\vec{v}_{y,z}^{\mathrm{eig}}(x)\|_{1}=1$ for $x=1,2,\dots,n$, and
$\\{\phi_{y,z}^{\mathrm{eig}}(x)\\}_{x=1}^{n}$ are the eigenvalues of
$\ln\hat{H}_{y,z}$ that satisfy
$\phi_{y,z}^{\mathrm{eig}}(1)\geq\phi_{y,z}^{\mathrm{eig}}(2)\geq\dots\geq\phi_{y,z}^{\mathrm{eig}}(n-1)\geq\phi_{y,z}^{\mathrm{eig}}(n)$.
Furthermore, we impose

$\displaystyle\sum_{x=1}^{n}\vec{v}_{y,z}^{\mathrm{eig}}(x)\vec{u}_{y,z}^{\mathrm{eig}}(x)$
$\displaystyle=\hat{1}_{n},$ (II.5.3)

for the normalization of $\vec{u}_{y,z}^{\mathrm{eig}}(x)$ for
$x=1,2,\dots,n$. Here $\hat{1}_{n}$ is the $n\times n$ identity matrix. By
definition, we have
$\vec{v}_{y,z}^{\mathrm{st}}=\vec{v}_{y,z}^{\mathrm{eig}}(1)$,
$\vec{u}_{y,z}^{\mathrm{st}}=\vec{u}_{y,z}^{\mathrm{eig}}(1)$, and
$\phi_{y,z}^{\mathrm{st}}=\phi_{y,z}^{\mathrm{eig}}(1)$.

###  II.6 Housekeeping growth and excess growth

In SST, heat is divided into two parts, that is, housekeeping and excess
parts. Similarly, we divide population growth into two parts:

$\displaystyle\Phi_{0\to t}$ $\displaystyle=\Phi_{0\to
t}^{\mathrm{hk}}+\Phi_{0\to t}^{\mathrm{ex}},$ (II.6.1)

where housekeeping growth and excess growth are given, respectively, by

$\displaystyle\Phi_{0\to t}^{\mathrm{hk}}$
$\displaystyle\coloneqq\sum_{\tau=1}^{t}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}},$
(II.6.2) $\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$
$\displaystyle\coloneqq\Phi_{0\to t}-\Phi_{0\to t}^{\mathrm{hk}}.$ (II.6.3)

Thus, the main purpose of this paper is to consider the Clausius equality and
inequality for excess growth, Eq. (II.6.3).

###  II.7 Forward and backward path probabilities

Path probabilities are useful for the derivation of the main results of this
paper. First we define the forward path probability as follows:

$\displaystyle p_{\mathrm{f}}(X_{0\to t}|Z_{0\to t})$
$\displaystyle\coloneqq\bigg{[}\prod_{\tau=1}^{t}T_{z_{\tau}}(x_{\tau}|x_{\tau-1})\bigg{]}p_{\mathrm{ini}}(x_{0}),$
(II.7.1)

where $X_{0\to t}\coloneqq\\{x_{\tau}\\}_{\tau=0}^{t}$ and $Z_{0\to
t}\coloneqq\\{z_{\tau}\\}_{\tau=0}^{t}$. We also define the backward path
probability as

$\displaystyle p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle\coloneqq\frac{\Big{(}\prod_{\tau=1}^{t}\mu_{y_{\tau}}(x_{\tau})\Big{)}p_{\mathrm{f}}(X_{0\to
t}|Z_{0\to
t})}{\Big{\langle}\prod_{\tau=1}^{t}\mu_{y_{\tau}}(x_{\tau})\Big{\rangle}_{p_{\mathrm{f}}(X_{0\to
t}|Z_{0\to t})}},$ (II.7.2)

where $Y_{0\to t}\coloneqq\\{y_{\tau}\\}_{\tau=0}^{t}$ and $\langle
f(x)\rangle_{g(x)}\coloneqq\sum_{x=1}^{n}f(x)g(x)$. The backward path
probability, Eq. (II.7.2), is also expressed as

$\displaystyle p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle=\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}-\phi(\tau)\hat{1}_{n}}\vec{v}(x_{\tau-1})\bigg{]}v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0}),$
(II.7.3)

where

$\displaystyle\vec{u}(x)$
$\displaystyle\coloneqq[\underbrace{0,\dots,0}_{x-1},1,\underbrace{0,\dots,0}_{n-x}],$
(II.7.4) $\displaystyle\vec{v}(x)$
$\displaystyle\coloneqq[\underbrace{0,\dots,0}_{x-1},1,\underbrace{0,\dots,0}_{n-x}]^{\intercal}.$
(II.7.5)

Our definitions of the forward and backward path probabilities are the same as
those defined in Ref. [29, 35, 36]. The forward path probability is the
probability of observing an organism whose history is $X_{0\to t}$ when we
randomly pick out an organism at time $0$ and track its phenotype-switching in
a time-forward manner. When the tracked organism duplicates, we can randomly
choose one of the daughters since the forward path probability does not depend
on the choice. On the other hand, the backward path probability is the
probability of observing an organism of which history is $X_{0\to t}$ when we
randomly choose an organism at time $t$ and track it back in a time-backward
manner. We utilize Eq. (II.7.2) to characterize the necessary condition for
the second main result of this paper.

##  III Main results

This section is the main part of this paper, in which we state the main
claims. The first one is the Clausius equality for excess growth, Eq.
(II.6.3), and the second one is the Clausius inequality for excess growth, Eq.
(II.6.3).

###  III.1 First main result

We state the first main result of this paper: the Clausius equality for excess
growth, Eq. (II.6.3). Let us consider a quasi-static process with Eq.
(II.2.1); that is, we focus on the process in which the initial state is given
by $\vec{N}_{0}=N_{0}\vec{v}_{y_{0},z_{0}}^{\mathrm{st}}$ and $\Delta
y_{\tau}\coloneqq y_{\tau}-y_{\tau-1}$ and $\Delta z_{\tau}\coloneqq
z_{\tau}-z_{\tau-1}$ are sufficiently small ($|\Delta y|,|\Delta z|\ll 1$)
such that $\vec{N}_{\tau}/N_{\tau}=\vec{v}_{y_{\tau},z_{\tau}}^{\mathrm{st}}$
for $\tau=0,1,2,\dots,t$.

If $w_{z}^{T}(x)$ in Eq. (II.2.2) is independent of $z$ for $x=1,2,\dots,n$:

$\displaystyle\nabla_{z}w_{z}^{T}(x)$ $\displaystyle=0,$ (III.1.1)

where $\nabla_{z}$ is the derivative with respect to $z$, we obtain the
Clausius equality for excess growth, Eq. (II.6.3):

$\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$
$\displaystyle=S(y_{t},z_{t})-S(y_{0},z_{0}),$ (III.1.2)

where the pseudo-entropy $S(y,z)$ is given by 111The pseudo-entropy (III.1.3)
is not the entropy, but in our framework, it plays an important role similar
to the entropy in thermodynamics; so we call it the pseudo-entropy.

$\displaystyle S(y,z)$
$\displaystyle\coloneqq\frac{1}{2}\ln\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)w_{z}^{T}(x).$
(III.1.3)

Here, we provide an example in which Eq. (III.1.1) is satisfied. Let us
consider a system of two phenotypes. If we set

$\displaystyle\hat{T}_{z}$
$\displaystyle=\begin{bmatrix}1-\omega_{z}&\omega_{z}\\\
\omega_{z}&1-\omega_{z}\end{bmatrix},$ (III.1.4)

where $[\hat{T}_{z}]_{x,x^{\prime}}\coloneqq T_{z}(x|x^{\prime})$, then the
stationary distribution is given by $[w_{z}^{T}(1),w_{z}^{T}(2)]=[1/2,1/2]$
for any $\omega_{z}$; thus, Eq. (III.1.1) is satisfied. Equation (III.1.4) can
be easily generalized to the case of $n$ phenotypes.

We have assumed the quasi-static process for the above theorem. Otherwise,
this theorem does not hold since the eigenstate associated with the largest
eigenvalue is not attainable. The following theorem, however, holds even when
the process is not quasi-static.

###  III.2 Second main result

Then we describe the second main result of this paper, that is, the Clausius
inequality for excess growth, Eq. (II.6.3). Let us assume that the initial
state is given by $\vec{N}_{0}=N_{0}\vec{v}_{y_{0},z_{0}}^{\mathrm{st}}$ and
$w_{z_{\tau}}^{T}(x_{\tau})$ satisfies

$\displaystyle\bigg{\langle}\sum_{\tau=1}^{t}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t}$ $\displaystyle\geq 0.$ (III.2.1)

where $\langle\cdot\rangle_{\mathrm{b},\tau\to\tau^{\prime}}$ is the expected
value with respect to the backward path probability, that is,
$\langle\cdot\rangle_{\mathrm{b},\tau\to\tau^{\prime}}\coloneqq\langle\cdot\rangle_{p_{\mathrm{b}}(X_{\tau\to\tau^{\prime}}|\vec{Y}_{\tau+1\to\tau^{\prime}},\vec{Z}_{\tau+1\to\tau^{\prime}})}$.
Then we have

$\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$ $\displaystyle\leq
S(y_{t},z_{t})-S(y_{0},z_{0}).$ (III.2.2)

Note that, when Eq. (III.1.1) is satisfied, Eq. (III.2.1) is also satisfied.

##  IV Derivation of the first main result

This section is devoted to the derivation of the Clausius equality, Eq.
(III.1.2). We first give another expression of excess growth, Eq. (II.6.3),
that is, the Berry-curvature-like expression, and then the detailed derivation
of the Clausius equality, Eq. (III.1.2), by using the Berry-curvature-like
expression of excess growth, Eq. (II.6.3).

###  IV.1 Berry-curvature-like expression of excess growth

Before getting the Clausius equality, Eq. (III.1.2), we show the Berry-
curvature-like expression of $\Phi_{0\to t}^{\mathrm{ex}}$ in a quasi-static
process:

$\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$
$\displaystyle=-\sum_{\tau=1}^{t}\bigg{[}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{y_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\bigg{]}\cdot\Delta
y_{\tau}-\sum_{\tau=1}^{t}\bigg{[}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{z_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\bigg{]}\cdot\Delta
z_{\tau},$ (IV.1.1)

where $\nabla_{y}$ is the derivative with respect to $y$. The proof of Eq.
(IV.1.1) is shown as follows.

###### Proof.

By using the path integral formulation, population growth, Eq. (II.6.1), can
be represented as

$\displaystyle e^{\Phi_{0\to t}}$
$\displaystyle=\frac{1}{N_{0}}\sum_{\begin{subarray}{c}\\{\vec{v}_{y_{\tau},z_{\tau}}^{\mathrm{eig}}(x_{\tau})\\}_{x_{\tau},\tau},\\\
\\{\vec{u}_{y_{\tau},z_{\tau}}^{\mathrm{eig}}(x_{\tau})\\}_{x_{\tau},\tau}\end{subarray}}\vec{1}_{n}\vec{v}_{y_{t},z_{t}}^{\mathrm{eig}}(x_{t})\bigg{[}\prod_{\tau=1}^{t}\vec{u}_{y_{\tau},z_{\tau}}^{\mathrm{eig}}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}_{y_{\tau-1},z_{\tau-1}}^{\mathrm{eig}}(x_{\tau-1})\bigg{]}\vec{u}_{y_{0},z_{0}}^{\mathrm{eig}}(x_{0})\vec{N}_{0},$
(IV.1.2)

where $\vec{1}_{n}=[\underbrace{1,1,\dots,1}_{n}]$. Note that
$\vec{1}_{n}\vec{v}_{y_{t},z_{t}}^{\mathrm{eig}}(x)=1$ for $x=1,2,\dots,n$.

In a quasi-static process, Eq. (IV.1.2) is dominated by the eigenstate that
has the largest eigenvalue; thus, when initial state is given by
$\vec{v}_{y_{0},z_{0}}^{\mathrm{st}}$, we have

$\displaystyle e^{\Phi_{0\to t}}$
$\displaystyle=\frac{1}{N_{0}}\vec{1}_{n}\vec{v}_{y_{t},z_{t}}^{\mathrm{st}}\bigg{[}\prod_{\tau=1}^{t}\vec{u}_{y_{\tau},z_{\tau}}^{\mathrm{st}}e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}_{y_{\tau-1},z_{\tau-1}}^{\mathrm{st}}\bigg{]}\vec{u}_{y_{0},z_{0}}^{\mathrm{st}}\vec{N}_{0}$
(IV.1.3)
$\displaystyle=\prod_{\tau=1}^{t}\vec{u}_{y_{\tau},z_{\tau}}^{\mathrm{st}}e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}_{y_{\tau-1},z_{\tau-1}}^{\mathrm{st}}.$
(IV.1.4)

Due to the fact that, for $x=1,2,\dots,n$,

$\displaystyle
u_{y,z}^{\mathrm{st}}(x)v_{y^{\prime},z^{\prime}}^{\mathrm{st}}(x)$
$\displaystyle=e^{-u_{y,z}^{\mathrm{st}}(x)\nabla_{y}v_{y,z}^{\mathrm{st}}(x)\cdot\Delta
y}e^{-u_{y,z}^{\mathrm{st}}(x)\nabla_{z}v_{y,z}^{\mathrm{st}}(x)\cdot\Delta
z},$ (IV.1.5)

each term in Eq. (IV.1.4) is computed as

$\displaystyle\vec{u}_{y,z}^{\mathrm{st}}e^{\ln\hat{H}_{y,z}}\vec{v}_{y^{\prime},z^{\prime}}^{\mathrm{st}}$
$\displaystyle=e^{\phi_{y,z}^{\mathrm{st}}}e^{\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)v_{y^{\prime},z^{\prime}}^{\mathrm{st}}(x)}$
(IV.1.6)
$\displaystyle=e^{\phi_{y,z}^{\mathrm{st}}}e^{-\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)\nabla_{y}v_{y,z}^{\mathrm{st}}(x)\cdot\Delta
y}e^{-\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)\nabla_{z}v_{y,z}^{\mathrm{st}}(x)\cdot\Delta
z}.$ (IV.1.7)

Then, Eq. (IV.1.4) can be rewritten as

$\displaystyle e^{\Phi_{0\to t}}$
$\displaystyle=\prod_{\tau=1}^{t}e^{\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}}e^{-\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{y_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\cdot\Delta
y_{\tau}}e^{-\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{z_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\cdot\Delta
z_{\tau}}.$ (IV.1.8)

By taking the logarithm of both sides of Eq. (IV.1.8), we have

$\displaystyle\Phi_{0\to t}$
$\displaystyle=\sum_{\tau=1}^{t}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}-\sum_{\tau=1}^{t}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{y_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\cdot\Delta
y_{\tau}-\sum_{\tau=1}^{t}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{z_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\cdot\Delta
z_{\tau}.$ (IV.1.9)

Since $\Phi_{0\to
t}^{\mathrm{hk}}=\sum_{\tau=1}^{t}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}$, we
have $\Phi_{0\to t}^{\mathrm{ex}}$, Eq. (IV.1.1).

∎

###  IV.2 Proof of the Clausius equality

In this subsection, we provide the proof of the Clausius equality, Eq.
(III.1.2). The proof is given as follows.

###### Proof.

We define

$\displaystyle\tilde{H}_{y,z}(x|x^{\prime})$
$\displaystyle\coloneqq\mu_{y}(x)T_{z}(x^{\prime}|x).$ (IV.2.1)

Eq. (II.2.2) leads to

$\displaystyle\sum_{x^{\prime}=1}^{n}\tilde{H}_{y,z}(x|x^{\prime})\frac{v_{y,z}^{\mathrm{st}}(x^{\prime})}{w_{z}^{T}(x^{\prime})}$
$\displaystyle=\sum_{x^{\prime}=1}^{n}\mu_{y}(x)T_{z}(x^{\prime}|x)\frac{v_{y,z}^{\mathrm{st}}(x^{\prime})}{w_{z}^{T}(x^{\prime})}$
(IV.2.2)
$\displaystyle=\sum_{x^{\prime}=1}^{n}\mu_{y}(x)T_{z}(x|x^{\prime})\frac{v_{y,z}^{\mathrm{st}}(x^{\prime})}{w_{z}^{T}(x)}$
(IV.2.3)
$\displaystyle=\sum_{x^{\prime}=1}^{n}H_{y,z}(x|x^{\prime})\frac{v_{y,z}^{\mathrm{st}}(x^{\prime})}{w_{z}^{T}(x)}$
(IV.2.4)
$\displaystyle=e^{\phi_{y,z}^{\mathrm{st}}}\frac{v_{y,z}^{\mathrm{st}}(x)}{w_{z}^{T}(x)}.$
(IV.2.5)

Due to the assumption that $T_{z}(x|x^{\prime})$ is ergodic and
$H_{y,z}(x|x^{\prime})$ is irreducible, and the Perron-Frobenius theorem, the
largest left eigenvector is unique. Thus, there exists $C_{y,z}$ such that,
for $x=1,2,\dots,n$,

$\displaystyle u_{y,z}^{\mathrm{st}}(x)$
$\displaystyle=C_{y,z}\frac{v_{y,z}^{\mathrm{st}}(x)}{w_{z}^{T}(x)}.$ (IV.2.6)

By using the fact that $\|\vec{v}_{y,z}^{\mathrm{st}}\|_{1}=1$, we have

$\displaystyle C_{y,z}$
$\displaystyle=\sum_{x=1}^{n}w_{z}^{T}(x)u_{y,z}^{\mathrm{st}}(x).$ (IV.2.7)

Furthermore, since
$\vec{u}_{y,z}^{\mathrm{st}}\vec{v}_{y,z}^{\mathrm{st}}=\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)v_{y,z}^{\mathrm{st}}(x)=1$,
we obtain

$\displaystyle C_{y,z}$
$\displaystyle=\sum_{x=1}^{n}w_{z}^{T}(x)[u_{y,z}^{\mathrm{st}}(x)]^{2}.$
(IV.2.8)

By taking the derivative of Eq. (IV.2.8) with respect to $y$, we have

$\displaystyle\frac{1}{2}\nabla_{y}\ln C_{y,z}$
$\displaystyle=\sum_{x=1}^{n}\frac{w_{z}^{T}(x)u_{y,z}^{\mathrm{st}}(x)}{C_{y,z}}\nabla_{y}u_{y,z}^{\mathrm{st}}(x)$
(IV.2.9)
$\displaystyle=\sum_{x=1}^{n}v_{y,z}^{\mathrm{st}}(x)\nabla_{y}u_{y,z}^{\mathrm{st}}(x)$
(IV.2.10)
$\displaystyle=-\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)\nabla_{y}v_{y,z}^{\mathrm{st}}(x),$
(IV.2.11)

where we have used Eq. (IV.2.6). Next, by taking the derivation of Eq.
(IV.2.8) with respect to $z$, we have almost the same expression:

$\displaystyle\frac{1}{2}\nabla_{z}\ln C_{y,z}$
$\displaystyle=\sum_{x=1}^{n}\frac{w_{z}^{T}(x)u_{y,z}^{\mathrm{st}}(x)}{C_{y,z}}\nabla_{z}u_{y,z}^{\mathrm{st}}(x)+\frac{1}{2}\sum_{x=1}^{n}\frac{(u_{y,z}^{\mathrm{st}}(x))^{2}}{C_{y,z}}\nabla_{z}w_{z}^{T}(x)$
(IV.2.12)
$\displaystyle=\sum_{x=1}^{n}v_{y,z}^{\mathrm{st}}(x)\nabla_{z}u_{y,z}^{\mathrm{st}}(x)+\frac{1}{2}\sum_{x=1}^{n}\frac{(u_{y,z}^{\mathrm{st}}(x))^{2}}{C_{y,z}}\nabla_{z}w_{z}^{T}(x)$
(IV.2.13)
$\displaystyle=\sum_{x=1}^{n}v_{y,z}^{\mathrm{st}}(x)\nabla_{z}u_{y,z}^{\mathrm{st}}(x)$
(IV.2.14)
$\displaystyle=-\sum_{x=1}^{n}u_{y,z}^{\mathrm{st}}(x)\nabla_{z}v_{y,z}^{\mathrm{st}}(x).$
(IV.2.15)

In Eq. (IV.2.14), the second term vanishes due to the assumption in Eq.
(III.1.1). Thus, Eq. (IV.1.1) can be computed further as

$\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$
$\displaystyle=-\sum_{\tau=1}^{t}\bigg{[}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{y_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\bigg{]}\cdot\Delta
y_{\tau}-\sum_{\tau=1}^{t}\bigg{[}\sum_{x=1}^{n}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\nabla_{z_{\tau}}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x)\bigg{]}\cdot\Delta
z_{\tau}$ (IV.2.16)
$\displaystyle=\sum_{\tau=1}^{t}\bigg{[}\frac{1}{2}\nabla_{y_{\tau}}\ln
C_{y_{\tau},z_{\tau}}\bigg{]}\cdot\Delta
y_{\tau}+\sum_{\tau=1}^{t}\bigg{[}\frac{1}{2}\nabla_{z_{\tau}}\ln
C_{y_{\tau},z_{\tau}}\bigg{]}\cdot\Delta z_{\tau}$ (IV.2.17)
$\displaystyle=\bigg{[}\frac{1}{2}\ln
C_{y,z}\bigg{]}_{y=y_{0},z=z_{0}}^{y=y_{t},z=z_{t}}$ (IV.2.18)
$\displaystyle=\big{[}S_{y,z}\big{]}_{y=y_{0},z=z_{0}}^{y=y_{t},z=z_{t}}$
(IV.2.19) $\displaystyle=S_{y_{t},z_{t}}-S_{y_{0},z_{0}},$ (IV.2.20)

where $S_{y,z}\coloneqq\frac{1}{2}\ln C_{y,z}$. Therefore we have obtained the
Clausius equality, Eq. (III.1.2).

∎

##  V Derivation of the second main result

This section shows the derivation of the Clausius inequality, Eq. (III.2.2).
We first define two different path probabilities and a symmetrized divergence.
Then, we show the derivation of the Clausius inequality, Eq. (III.2.2).

###  V.1 Path probabilities and symmetrized divergence

In this subsection, we introduce the two different path probabilities and the
symmetrized divergence on the path probabilities. These quantities are
essential to prove the Clausius inequality, Eq. (III.2.2).

####  V.1.1 Retrospective process and its dual process

Here, we introduce a Markov process that mimics the backward path probability
for a fixed environment, called the retrospective process. The backward path
probability, Eq. (II.7.2), is also expressed as

$\displaystyle p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle=e^{-\sum_{\tau=1}^{t}\phi_{\tau}}\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau-1})\bigg{]}v_{y_{0},z_{0}}(x_{0})$
(V.1.1)
$\displaystyle=\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}-\phi_{\tau}\hat{1}_{n}}\vec{v}(x_{\tau-1})\bigg{]}v_{y_{0},z_{0}}(x_{0}).$
(V.1.2)

Note that we have used $p_{\mathrm{ini}}(x_{0})=v_{y_{0},z_{0}}(x_{0})$. In a
quasi-static process or the case where the changes of $y_{\tau}$ and
$z_{\tau}$ are sufficiently small, we have

$\displaystyle p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle\approx p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t}),$
(V.1.3)

where

$\displaystyle p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle\coloneqq\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{Q}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau-1})\bigg{]}w_{y_{0},z_{0}}^{Q}(x_{0}),$
(V.1.4)

and

$\displaystyle\hat{Q}_{y,z}$
$\displaystyle\coloneqq\begin{bmatrix}Q_{y,z}(1|1)&Q_{y,z}(1|2)&\dots&Q_{y,z}(1|n)\\\
Q_{y,z}(2|1)&Q_{y,z}(2|2)&\dots&Q_{y,z}(2|n)\\\ \vdots&\vdots&\ddots&\vdots\\\
Q_{y,z}(n|1)&Q_{y,z}(n|2)&\dots&Q_{y,z}(3|n)\\\ \end{bmatrix},$ (V.1.5)
$\displaystyle Q_{y,z}(x|x^{\prime})$
$\displaystyle\coloneqq\frac{u_{y,z}^{\mathrm{st}}(x)}{u_{y,z}^{\mathrm{st}}(x^{\prime})}H_{y,z}(x|x^{\prime})e^{-\phi_{y,z}^{\mathrm{st}}}.$
(V.1.6)

Note that

$\displaystyle\sum_{x=1}^{n}Q_{y,z}(x|x^{\prime})$
$\displaystyle=\sum_{x=1}^{n}\frac{u_{y,z}^{\mathrm{st}}(x)}{u_{y,z}^{\mathrm{st}}(x^{\prime})}H_{y,z}(x|x^{\prime})e^{-\phi_{y,z}^{\mathrm{st}}}$
(V.1.7)
$\displaystyle=\frac{u_{y,z}^{\mathrm{st}}(x^{\prime})}{u_{y,z}^{\mathrm{st}}(x^{\prime})}e^{\phi_{y,z}^{\mathrm{st}}}e^{-\phi_{y,z}^{\mathrm{st}}}$
(V.1.8) $\displaystyle=1;$ (V.1.9)

thus, $Q_{y,z}(x|x^{\prime})$ can be interpreted as a conditional probability.

We then consider the Markov process induced by

$\displaystyle\tilde{Q}_{y,z}(x|x^{\prime})$
$\displaystyle\coloneqq\frac{v_{y,z}^{\mathrm{st}}(x)}{v_{y,z}^{\mathrm{st}}(x^{\prime})}H_{y,z}(x^{\prime}|x)e^{-\phi_{y,z}^{\mathrm{st}}}.$
(V.1.10)

Note that the following identity holds:

$\displaystyle\sum_{x=1}^{n}\tilde{Q}_{y,z}(x|x^{\prime})$
$\displaystyle=\sum_{x=1}^{n}\frac{v_{y,z}^{\mathrm{st}}(x)}{v_{y,z}^{\mathrm{st}}(x^{\prime})}H_{y,z}(x^{\prime}|x)e^{-\phi_{y,z}^{\mathrm{st}}}$
(V.1.11) $\displaystyle=1.$ (V.1.12)

From Eqs. (V.1.6) and (V.1.10), we have

$\displaystyle\tilde{Q}_{y,z}(x|x^{\prime})$
$\displaystyle=\frac{v_{y,z}^{\mathrm{st}}(x)}{v_{y,z}^{\mathrm{st}}(x^{\prime})}H_{y,z}(x^{\prime}|x)e^{-\phi_{y,z}^{\mathrm{st}}}$
(V.1.13)
$\displaystyle=\frac{w_{y,z}^{Q}(x)}{w_{y,z}^{Q}(x^{\prime})}\bigg{(}\frac{u_{y,z}^{\mathrm{st}}(x^{\prime})}{u_{y,z}^{\mathrm{st}}(x)}H_{y,z}(x^{\prime}|x)e^{-\phi_{y,z}^{\mathrm{st}}}\bigg{)}$
(V.1.14)
$\displaystyle=\frac{w_{y,z}^{Q}(x)}{w_{y,z}^{Q}(x^{\prime})}Q_{y,z}(x^{\prime}|x),$
(V.1.15)

where

$\displaystyle w_{y,z}^{Q}(x)$ $\displaystyle\coloneqq
v_{y,z}^{\mathrm{st}}(x)u_{y,z}^{\mathrm{st}}(x).$ (V.1.16)

We also note that $w_{y,z}^{Q}(x)$ satisfies the condition of probability
distribution: $\sum_{x=1}^{n}w_{y,z}^{Q}(x)=1$.

The process induced by Eq. (V.1.10), which we call the dual retrospective
process, is given by

$\displaystyle p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})$
$\displaystyle\coloneqq{\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau-1})e^{\ln\hat{\tilde{Q}}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau})\bigg{]}w_{y_{t},z_{t}}^{Q}(x_{t}),}$
(V.1.17)

where

$\displaystyle\hat{\tilde{Q}}_{y,z}$
$\displaystyle\coloneqq\begin{bmatrix}\tilde{Q}_{y,z}(1|1)&\tilde{Q}_{y,z}(1|2)&\dots&\tilde{Q}_{y,z}(1|n)\\\
\tilde{Q}_{y,z}(2|1)&\tilde{Q}_{y,z}(2|2)&\dots&\tilde{Q}_{y,z}(2|n)\\\
\vdots&\vdots&\ddots&\vdots\\\
\tilde{Q}_{y,z}(n|1)&\tilde{Q}_{y,z}(n|2)&\dots&\tilde{Q}_{y,z}(n|n)\\\
\end{bmatrix},$ (V.1.18)

and $X_{0\to t}^{\mathrm{r}}$, $Y_{0\to t}^{\mathrm{r}}$, and $Z_{0\to
t}^{\mathrm{r}}$ are the reversed processes of $X_{0\to t}$, $Y_{0\to t}$, and
$Z_{0\to t}$, respectively.

####  V.1.2 Symmetrized divergence

We define the symmetrized divergence on the path probabilities by computing
the logarithm of the ratios between path probabilities. In the following
subsection, we utilize it to prove the Clausius inequality, Eq. (III.2.2).

From Eq. (V.1.5), we have

$\displaystyle\vec{u}(x)e^{\ln\hat{Q}_{y,z}}\vec{v}(x^{\prime})$
$\displaystyle=e^{-\phi_{y,z}^{\mathrm{st}}}\frac{u_{y,z}^{\mathrm{st}}(x)}{u_{y,z}^{\mathrm{st}}(x_{\tau-1})}\vec{u}(x)e^{\ln\hat{H}_{y,z}}\vec{v}(x^{\prime}).$
(V.1.19)

Then, Eq. (V.1.4) can be rewritten as

$\displaystyle p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle=\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{Q}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau-1})\bigg{]}v_{y_{0},z_{0}}(x_{0})$
(V.1.20)
$\displaystyle=e^{-\sum_{\tau}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}}\frac{\prod_{\tau=1}^{t}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}{\prod_{\tau=1}^{t}u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau-1})}\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau-1})\bigg{]}w_{y_{0},z_{0}}^{Q}(x_{0}),$
(V.1.21)

and

$\displaystyle p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$
$\displaystyle=\exp\bigg{(}-\sum_{\tau=1}^{t}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}\bigg{)}\exp\bigg{(}-\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}\bigg{)}\exp\bigg{(}-\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
z_{\tau}\bigg{)}$
$\displaystyle\quad\times\exp\bigg{(}\ln\frac{u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})}{u_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}+\ln\frac{w_{y_{0},z_{0}}^{Q}(x_{0})}{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}\bigg{)}e^{\Phi_{0\to
t}}p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t}).$ (V.1.22)

Thus, the logarithm of the ratio between $p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})$ and $p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})$ is
computed as

$\displaystyle\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})}$
$\displaystyle=-\Phi_{0\to
t}^{\mathrm{ex}}-\ln\frac{u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})}{u_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}-\ln\frac{w_{y_{0},z_{0}}^{Q}(x_{0})}{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}$
$\displaystyle\quad+\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}+\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta z_{\tau}$
(V.1.23) $\displaystyle=-\Phi_{0\to t}^{\mathrm{ex}}-\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})+\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}+\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta z_{\tau},$
(V.1.24)

where we have used Eqs. (II.6.2) and (II.6.3).

Next, we consider the dual retrospective process. From Eq. (V.1.18), we have

$\displaystyle\vec{u}(x^{\prime})e^{\ln\hat{\tilde{Q}}_{y,z}}\vec{v}(x)$
$\displaystyle=e^{-\phi_{y,z}^{\mathrm{st}}}\frac{v_{y,z}^{\mathrm{st}}(x_{\tau-1})}{v_{y,z}^{\mathrm{st}}(x)}\vec{u}(x)e^{\ln\hat{H}_{y,z}}\vec{v}(x^{\prime}).$
(V.1.25)

Then, Eq. (V.1.17) is rewritten as

$\displaystyle p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})$
$\displaystyle=e^{-\sum_{\tau}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}}\frac{\prod_{\tau=1}^{t}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau-1})}{\prod_{\tau=1}^{t}v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}\bigg{[}\prod_{\tau=1}^{t}\vec{u}(x_{\tau})e^{\ln\hat{H}_{y_{\tau},z_{\tau}}}\vec{v}(x_{\tau-1})\bigg{]}w_{y_{t},z_{t}}^{Q}(x_{t}),$
(V.1.26)

and then we have

$\displaystyle p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})$
$\displaystyle=\exp\bigg{(}-\sum_{\tau=1}^{t}\phi_{y_{\tau},z_{\tau}}^{\mathrm{st}}\bigg{)}\exp\bigg{(}\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}\bigg{)}\exp\bigg{(}\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
z_{\tau}\bigg{)}$
$\displaystyle\quad\times\exp\bigg{(}\ln\frac{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}{v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})}+\ln\frac{w_{y_{t},z_{t}}^{Q}(x_{t})}{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}\bigg{)}e^{\Phi_{0\to
t}}p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t}).$ (V.1.27)

Thus, the logarithm of the ratio between $p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})$ and $p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})$ is computed as

$\displaystyle\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})}$ $\displaystyle=-\Phi_{0\to
t}^{\mathrm{ex}}-\ln\frac{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}{v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})}-\ln\frac{w_{y_{t},z_{t}}^{Q}(x_{t})}{v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})}$
$\displaystyle\quad-\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}-\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta z_{\tau}$
(V.1.28) $\displaystyle=-\Phi_{0\to t}^{\mathrm{ex}}-\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})-\sum_{\tau=1}^{t}\big{[}\nabla_{y_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta
y_{\tau}-\sum_{\tau=1}^{t}\big{[}\nabla_{z_{\tau}}\ln
v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})\big{]}\cdot\Delta z_{\tau}.$
(V.1.29)

By using Eqs. (V.1.24) and (V.1.29), we have

$\displaystyle\frac{1}{2}\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}+\frac{1}{2}\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})}$ $\displaystyle\quad=\ln\frac{p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})}{\big{[}p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})\big{]}^{\frac{1}{2}}}$ (V.1.30)
$\displaystyle\quad=-\Phi_{0\to t}^{\mathrm{ex}}-\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})+\frac{1}{2}\sum_{\tau=1}^{t}\bigg{[}\nabla_{y_{\tau}}\ln\frac{u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}{v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}\bigg{]}\cdot\Delta
y_{\tau}+\frac{1}{2}\sum_{\tau=1}^{t}\bigg{[}\nabla_{z_{\tau}}\ln\frac{u_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}{v_{y_{\tau},z_{\tau}}^{\mathrm{st}}(x_{\tau})}\bigg{]}\cdot\Delta
z_{\tau}$ (V.1.31) $\displaystyle\quad=-\Phi_{0\to t}^{\mathrm{ex}}-\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})+\frac{1}{2}\sum_{\tau=1}^{t}\bigg{[}\nabla_{y_{\tau}}\ln\frac{C_{y_{\tau},z_{\tau}}}{w_{z_{\tau}}^{T}(x_{\tau})}\bigg{]}\cdot\Delta
y_{\tau}+\frac{1}{2}\sum_{\tau=1}^{t}\bigg{[}\nabla_{z_{\tau}}\ln\frac{C_{y_{\tau},z_{\tau}}}{w_{z_{\tau}}^{T}(x_{\tau})}\bigg{]}\cdot\Delta
z_{\tau}$ (V.1.32) $\displaystyle\quad=-\Phi_{0\to t}^{\mathrm{ex}}-\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})+\frac{1}{2}\big{[}\ln C_{y_{t},z_{t}}-\ln
C_{y_{0},z_{0}}\big{]}-\frac{1}{2}\sum_{\tau=1}^{t}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta z_{\tau}.$ (V.1.33)

Then, we define the symmetrized divergence as

$\displaystyle D_{0\to t}^{\mathrm{sym}}$
$\displaystyle\coloneqq\bigg{\langle}\ln\frac{p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})}{\big{[}p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})\big{]}^{\frac{1}{2}}}\bigg{\rangle}_{\mathrm{b},0\to t},$
(V.1.34)

and it is computed as

$\displaystyle D_{0\to t}^{\mathrm{sym}}$
$\displaystyle=\int\mathcal{D}X_{0\to t}\,p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{\big{[}p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})\big{]}^{\frac{1}{2}}}$ (V.1.35) $\displaystyle=-\Phi_{0\to
t}^{\mathrm{ex}}+S_{y_{t},z_{t}}-S_{y_{0},z_{0}}-\int\mathcal{D}X_{0\to
t}\,p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})$ (V.1.36) $\displaystyle=-\Phi_{0\to
t}^{\mathrm{ex}}+S_{y_{t},z_{t}}-S_{y_{0},z_{0}}-\sum_{x_{t}=1}^{n}v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})-\bigg{\langle}\sum_{\tau=1}^{t}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t},$ (V.1.37)

where $\int\mathcal{D}X_{0\to t}\coloneqq\sum_{\\{X_{0\to t}\\}}$. Note that
we have used
$v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})=\sum_{x_{0},x_{1},\dots,x_{t-1}}p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})$ and
$v_{y_{0},z_{0}}^{\mathrm{st}}(x_{0})=\sum_{x_{1},x_{2},\dots,x_{t}}p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})$ since we are studying a transition between
stationary states. Note that the non-negativity of the symmetrized divergence
is shown in Appendix A.

###  V.2 Proof of the Clausius inequality

We define

$\displaystyle\sigma_{0\to t}$ $\displaystyle\coloneqq-\Phi_{0\to
t}^{\mathrm{ex}}+S_{y_{t},z_{t}}-S_{y_{0},z_{0}}.$ (V.2.1)

Note that $\sigma_{0\to t}$ is not thermodynamically the entropy production,
but we call it the entropy production since its mathematical properties are
similar to the thermodynamic entropy production. In the rest of this section,
we prove the following inequality:

$\displaystyle\sigma_{0\to t}$ $\displaystyle\geq 0.$ (V.2.2)

Eq. (V.2.2) leads to the Clausius inequality, Eq. (III.2.2).

###### Proof.

For any given process from $\tau=0$ to $\tau=t$, we can define a new process
from $\tau=0$ to $\tau=t^{\prime}$ such that it is identical to the given
process from $\tau=0$ to $\tau=t$ and the duplication rate of the new process
is constant ($\mu_{y_{\tau}}(x)=\mathrm{const.}$) for $t\leq\tau\leq
t^{\prime}$. In this proof, we use the new process. Note that we can perform
this technique for any process; so, this discussion is not a limitation. To
describe the new process, we also define $Y_{0\to
t^{\prime}}\coloneqq\\{y_{\tau}\\}_{\tau=0}^{t^{\prime}}$, $Y_{t+1\to
t^{\prime}}\coloneqq\\{y_{\tau}\\}_{\tau=t+1}^{t^{\prime}}$, $Z_{0\to
t^{\prime}}\coloneqq\\{z_{\tau}\\}_{\tau=0}^{t^{\prime}}$, and $Z_{t\to
t^{\prime}}\coloneqq\\{z_{\tau}\\}_{\tau=t+1}^{t^{\prime}}$.

From Eq. (V.1.37), we have

$\displaystyle\Phi_{0\to t}^{\mathrm{ex}}$
$\displaystyle=S_{y_{t},z_{t}}-S_{y_{0},z_{0}}-D_{0\to
t}^{\mathrm{sym}}-\sum_{x_{t}=1}^{n}v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})-\bigg{\langle}\sum_{\tau=1}^{t}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t}.$ (V.2.3)

Due to the assumption $\mu_{y_{t^{\prime}}}(x)=\mathrm{const.}$, we have
$u_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x)=1$ for $x=1,2,\dots,n$.
Then, we get $S_{y_{t^{\prime}},z_{t^{\prime}}}=0$ and
$\sum_{x_{t^{\prime}}=1}^{n}v_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})\ln
u_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})=0$ [32]; thus
we obtain

$\displaystyle\Phi_{0\to t^{\prime}}^{\mathrm{ex}}$
$\displaystyle=S_{y_{t^{\prime}},z_{t^{\prime}}}-S_{y_{0},z_{0}}-D_{0\to
t^{\prime}}^{\mathrm{sym}}-\sum_{i_{t^{\prime}}=1}^{n}v_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})\ln
u_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})-\bigg{\langle}\sum_{\tau=1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t^{\prime}}$ (V.2.4)
$\displaystyle=-S_{y_{0},z_{0}}-D_{0\to
t^{\prime}}^{\mathrm{sym}}-\bigg{\langle}\sum_{\tau=1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t^{\prime}}$ (V.2.5)
$\displaystyle\leq-
S_{y_{0},z_{0}}-\bigg{\langle}\sum_{\tau=1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t^{\prime}},$ (V.2.6)

and

$\displaystyle\Phi_{t\to t^{\prime}}^{\mathrm{ex}}$
$\displaystyle=S_{y_{t^{\prime}},z_{t^{\prime}}}-S_{y_{t},z_{t}}-D_{t\to
t^{\prime}}^{\mathrm{sym}}-\sum_{i_{t^{\prime}}=1}^{n}v_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})\ln
u_{y_{t^{\prime}},z_{t^{\prime}}}^{\mathrm{st}}(x_{t^{\prime}})-\bigg{\langle}\sum_{\tau=t+1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},t\to t^{\prime}}$ (V.2.7)
$\displaystyle=-S_{y_{t},z_{t}}-D_{t\to
t^{\prime}}^{\mathrm{sym}}-\bigg{\langle}\sum_{\tau=t+1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},t\to t^{\prime}}$ (V.2.8)
$\displaystyle\leq-
S_{y_{t},z_{t}}-\bigg{\langle}\sum_{\tau=t+1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},t\to t^{\prime}}.$ (V.2.9)

Next, let us denote $Y_{0\to t}$, $Y_{t+1\to t^{\prime}}$, and $Y_{1\to
t^{\prime}}$ that maximize $\Phi_{0\to t}^{\mathrm{ex}}$, $\Phi_{t\to
t^{\prime}}^{\mathrm{ex}}$, and $\Phi_{0\to t^{\prime}}^{\mathrm{ex}}$, by
$Y_{0\to t}^{*}$, $Y_{t+1\to t^{\prime}}^{*}$, and $Y_{1\to t^{\prime}}^{*}$,
respectively. We also denote the maximized values of $\Phi_{0\to
t}^{\mathrm{ex}}$, $\Phi_{t\to t^{\prime}}^{\mathrm{ex}}$, $\Phi_{0\to
t^{\prime}}^{\mathrm{ex}}$, and $D_{0\to t}^{\mathrm{sym}}$ by $\Phi_{0\to
t}^{\mathrm{ex},*}$, $\Phi_{t\to t^{\prime}}^{\mathrm{ex},*}$, $\Phi_{0\to
t^{\prime}}^{\mathrm{ex},*}$, and $D_{0\to t}^{\mathrm{sym},*}$, respectively.
In this case, the following relation holds:

$\displaystyle\Phi_{0\to t}^{\mathrm{ex},*}+\Phi_{t\to
t^{\prime}}^{\mathrm{ex},*}$ $\displaystyle\leq\Phi_{0\to
t^{\prime}}^{\mathrm{ex},*},$ (V.2.10)

and, due to the Clausius equality, Eq. (III.1.2), we have

$\displaystyle\Phi_{t\to t^{\prime}}^{\mathrm{ex},*}$
$\displaystyle=-S_{y_{t},z_{t}}-\bigg{\langle}\sum_{\tau=t+1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},t\to t^{\prime}},$ (V.2.11)
$\displaystyle\Phi_{0\to t^{\prime}}^{\mathrm{ex},*}$
$\displaystyle=-S_{y_{0},z_{0}}-\bigg{\langle}\sum_{\tau=1}^{t^{\prime}}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t^{\prime}}.$ (V.2.12)

Thus, Eq. (V.2.10) leads to

$\displaystyle S_{y_{t},z_{t}}-S_{y_{0},z_{0}}-D_{0\to
t}^{\mathrm{sym},*}-\sum_{x_{t}=1}^{n}v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})-S_{y_{t},z_{t}}$ $\displaystyle\leq-
S_{y_{0},z_{0}}.$ (V.2.13)

Then,

$\displaystyle D_{0\to
t}^{\mathrm{sym},*}+\sum_{x_{t}=1}^{n}v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})$ $\displaystyle\geq 0.$ (V.2.14)

By definition, $Y_{0\to t}^{*}$ maximizes $\Phi_{0\to t}^{\mathrm{ex}}$; thus,
for any $Y_{0\to t}$, we have

$\displaystyle D_{0\to t}^{\mathrm{sym}}$ $\displaystyle\geq D_{0\to
t}^{\mathrm{sym},*}.$ (V.2.15)

By using Eqs. (V.2.1) and (V.1.37), we have

$\displaystyle\sigma_{0\to t}$ $\displaystyle=D_{0\to
t}^{\mathrm{sym}}+\sum_{x_{t}=1}^{n}v_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})\ln
u_{y_{t},z_{t}}^{\mathrm{st}}(x_{t})+\bigg{\langle}\sum_{\tau=1}^{t}\Big{(}\nabla_{z_{\tau}}\ln
w_{z_{\tau}}^{T}(x_{\tau})\Big{)}\cdot\Delta
z_{\tau}\bigg{\rangle}_{\mathrm{b},0\to t}.$ (V.2.16)

Thus, Eqs. (V.2.14), (V.2.15), and (III.2.1) lead to Eq. (V.2.2).

∎

##  VI Numerical simulations

In this section, we show numerical simulations to demonstrate the second main
result, Eq. (III.2.2). Using Eqs. (II.6.3), we transform (III.2.2) into

$\displaystyle\Phi_{0\to t}$ $\displaystyle\leq\Phi_{0\to
t}^{\mathrm{hk}}+S_{y_{t},z_{t}}-S_{y_{0},z_{0}}.$ (VI.0.1)

Furthermore, Eq. (VI.0.2) is simplified as follows when $t$ is sufficiently
long or $y_{0}=y_{t}$ and $z_{0}=z_{t}$ are satisfied:

$\displaystyle\Phi_{0\to t}$ $\displaystyle\leq\Phi_{0\to t}^{\mathrm{hk}}.$
(VI.0.2)

Then we confirm Eq. (VI.0.2) via numerical simulations. Note that, in the
setup, $t$ is sufficiently large.

###  VI.1 Problem setup of numerical simulations

For simplicity, we consider organisms of two phenotypes. We set the
duplication rates of two phenotypes $\mu_{y_{\tau}}(1)=0$ and
$\mu_{y_{\tau}}(2)=y_{\tau}$, where $\Delta y_{\tau}\coloneqq
y_{\tau}-y_{\tau-1}\sim\mathcal{N}(\cdot;m_{y},(\sigma_{y})^{2})$ for
$\tau=1,2,\dots,t$. We consider the following transition matrices:

$\displaystyle\hat{T}_{z_{\tau}>0}$
$\displaystyle=\begin{bmatrix}1-\omega_{\alpha}&\omega_{\alpha}\\\
\omega_{\alpha}&1-\omega_{\alpha}\end{bmatrix},$ (VI.1.1a)
$\displaystyle\hat{T}_{z_{\tau}<0}$
$\displaystyle=\begin{bmatrix}1-\omega_{\beta}&\omega_{\beta}\\\
\omega_{\beta}&1-\omega_{\beta}\end{bmatrix},$ (VI.1.1b)
$\displaystyle\hat{T}_{z_{\tau}=0}$
$\displaystyle=\begin{bmatrix}1-\omega_{\gamma}&\omega_{\gamma}\\\
\omega_{\gamma}&1-\omega_{\gamma}\end{bmatrix},$ (VI.1.1c)

where $z_{\tau}\sim\mathcal{N}(\cdot;y_{\tau},(\sigma_{z})^{2})$ and
$1>\omega_{\alpha},\omega_{\beta}\geq 0$. We also put
$\omega_{\alpha}\geq\omega_{\beta}$ and
$\omega_{\gamma}\coloneqq\frac{1}{2}(\omega_{\alpha}+\omega_{\beta})$. Note
that Eq. (VI.1.1) has the same form as Eq. (III.1.4); thus, Eq. (VI.1.1)
satisfies the conditions of the Clausius equality and inequality, Eqs.
(III.1.1) and (III.2.1).

So far, we have discussed using the temporal information $z_{\tau}$ at time
$\tau$ and investigated this in Sec. VI.2. We refer to this as the naive
strategy. We also consider another approach. In Sec. VI.2, we deal with the
time-averaging of $z_{\tau}$ given by

$\displaystyle\zeta_{\tau}(t^{\mathrm{ta}})$
$\displaystyle\coloneqq\frac{1}{t^{\mathrm{ta}}}\sum_{\tau^{\prime}=\tau-t^{\mathrm{ta}}+1}^{\tau}z_{\tau^{\prime}},$
(VI.1.2)

and $z_{\tau}=0$ for $\tau\leq 0$; that is,
$\hat{T}_{\zeta_{\tau}(t^{\mathrm{ta}})}$ is used instead of
$\hat{T}_{z_{\tau}}$. We refer to this as the time-averaging strategy.

###  VI.2 Numerical simulation I

Here we focus on the naive strategy. We set $m_{y}=0.0$ and
$\sigma_{y}=0.0010$ for the distribution of $\Delta y_{\tau}$, and use
$\omega_{\alpha}=0.05$ and $\omega_{\beta}=0.01$ for
$T_{z_{\tau}}(x|x^{\prime})$. We start with $N_{0}(1)=N_{0}(2)=5.0$. To see
the effect of noise on information, we consider two distributions of
$z_{\tau}$: $\sigma_{z}=0.010$ and $\sigma_{z}=0.0010$.

In Fig. 1, we show the dynamics of $y_{\tau}$ and $z_{\tau}$ in red and green
lines, respectively. Depending on $\sigma_{z}$, green lines in Figs. 1(a) and
(b) are quite different.

Figure 1: Dynamics of $y_{\tau}$ (red line), $z_{\tau}$ (green line), and
$\zeta_{\tau}(t^{\mathrm{ta}}=50)$ (blue line) in the cases of (a)
$\sigma_{z}=0.010$ and (b) $\sigma_{z}=0.0010$.

In Figs. 2(a) and (b), we show $N_{0}e^{\Phi_{0\to t}}$ and
$N_{0}e^{\Phi_{0\to t}^{\mathrm{hk}}}$. We set $\sigma_{z}=0.010$ and
$\sigma_{z}=0.0010$ in Figs. 2(a) and (b), respectively. In both cases,
$N_{0}e^{\Phi_{0\to t}}$ is bounded by $N_{0}e^{\Phi_{0\to t}^{\mathrm{hk}}}$,
and thus this numerical result supports Eq. (VI.0.2). Note that this process
is sufficiently long; thus the pseudo-entropy difference is negligible. In
Fig. 3, we plot the gap between the number of organisms and its bound, $\Delta
N_{\tau}\coloneqq
N_{0}e^{\Phi_{0\to\tau}^{\mathrm{hk}}}-N_{0}e^{\Phi_{0\to\tau}}$, for both
cases. This figure implies that in the case of small noise on information,
$\Delta N_{\tau}$ gets small. Thus, it also tells us that, to attain the
bound, accurate information is critically important.

Figure 2: Total number of organisms $N_{0}e^{\Phi_{0\to\tau}}$ (red solid
line) and housekeeping number of organisms
$N_{0}e^{\Phi_{0\to\tau}^{\mathrm{hk}}}$ (blue dashed line) for (a)
$\sigma_{z}=0.010$ and (b) $\sigma_{z}=0.0010$ in the case of the naive
strategy. Figure 3: Gap between the number of organisms and its bound in the
case of the naive strategy, $\Delta N_{\tau}$, for $\sigma_{z}=0.010$ and
$\sigma_{z}=0.0010$.

###  VI.3 Numerical simulation II

We focus on the time-averaging strategy. We again use the numerical setup
shown above. For the time-averaging strategy, we use the moving average
represented by Eq. (VI.1.2) and put $t^{\mathrm{ta}}=50$. Blue lines in Fig. 1
denote $\zeta_{\tau}(t^{\mathrm{ta}}=50)$. We denote, by $\Phi_{0\to
t}^{\mathrm{ta,hk}}$, housekeeping growth, Eq. (II.6.2), in the case of the
time-averaging strategy.

Similarly to the above numerical simulation, we added larger Gaussian noise
with $\sigma_{z}=0.010$ on $z_{\tau}$ in Fig. 4(a) and smaller Gaussin noise
with $\sigma_{z}=0.0010$ on $z_{\tau}$ in Fig. 4(b). Figures 4(a) and (b) show
that Eq. (VI.0.2) holds for the time-averaging strategy. In Fig. 5, we plot
the gap between the number of organisms and its bound, $\Delta
N_{\tau}^{\mathrm{ta}}\coloneqq
N_{0}e^{\Phi_{0\to\tau}^{\mathrm{ta,hk}}}-N_{0}e^{\Phi_{0\to\tau}^{\mathrm{ta}}}$,
for both cases. This figure shows that $\Delta N_{\tau}^{\mathrm{ta}}$ is
almost the same for both cases and insensitive to the magnitude of noise. This
implies that the time-averaging strategy is robust and useful under noisy
situations. Note that, to implement the time-averaging strategy, organisms
must have memories.

Figure 4: Total number of organisms $N_{0}e^{\Phi_{0\to\tau}^{\mathrm{ta}}}$
(red solid line) and housekeeping number of organisms
$N_{0}e^{\Phi_{0\to\tau}^{\mathrm{ta,hk}}}$ (blue dashed line) for (a)
$\sigma_{z}=0.010$ and (b) $\sigma_{z}=0.0010$ in the case of the time-
averaging strategy. Figure 5: Gap between the number of organisms and its
bound in the case of the time-averaging strategy, $\Delta
N_{\tau}^{\mathrm{ta}}$, for $\sigma_{z}=0.010$ and $\sigma_{z}=0.0010$.

##  VII Discussions

This section discusses the findings of this paper. We first explain the
novelty of the Clausius inequality, Eq. (III.2.2), by comparing it with a
trivial bound. Then we explain the gap between them by using perturbation
theory on eigenvalues. To clarify the novelty of our findings, we also mention
the relationship between the Clausius inequality, Eq. (III.2.2), and the
Clausius inequality found in Ref. [32]. Finally, we explain that a similar
relationship also holds for the expected values.

###  VII.1 Novelty of the Clausius inequality

In short, the novelty of the Clausius inequality, Eq. (III.2.2), is that
excess growth, Eq. (II.6.3), is bounded by the difference between the path-
independent quantities, Eq. (III.1.3), which we call the pseudo-entropy, at
the beginning and end of a given process. We elaborate on the novelty of the
Clausius inequality, Eq. (III.2.2), by using Eq.(VI.0.1) because it provides
us with a slightly different perspective. Let us introduce
$\mu_{y}^{\mathrm{max}}\coloneqq\max_{x}\mu_{y}(x)$, which is the maximum
duplication rate when $y$ is given. Since
$\phi_{y,z}^{\mathrm{st}}\leq\mu_{y}^{\mathrm{max}}$, we have a following
trivial bound:

$\displaystyle\Phi_{0\to t}$ $\displaystyle\leq\Phi_{0\to
t}^{\mathrm{max}}+S_{y_{t},z_{t}}-S_{y_{0},z_{0}}.$ (VII.1.1)

where

$\displaystyle\Phi_{0\to t}^{\mathrm{max}}$
$\displaystyle\coloneqq\sum_{\tau=1}^{t}\mu_{y_{\tau}}^{\mathrm{max}}.$
(VII.1.2)

If $\\{y_{\tau}\\}_{\tau=0,1,\dots,t}$ are given, then Eq. (VII.1.1) becomes a
good bound because organisms can always select the phenotype that has the
largest duplication rate for given $y_{\tau}$. However, in a practical setup,
organisms cannot get $y_{\tau}$ directly. Thus, the Clausius inequality, Eq.
(III.2.2), provides us with a tighter bound than Eq. (VII.1.1) for a practical
setup.

###  VII.2 Perturbation analysis of the Clausius equality and inequality

By using the perturbation theory on eigenvalues, we have

$\displaystyle\phi_{y,z}^{\mathrm{st}}$
$\displaystyle\approx\mu_{y}^{\mathrm{max}}+[\vec{v}_{y,z}^{\mathrm{max}}]^{\intercal}\hat{M}_{y}(\hat{T}_{z}-\hat{1}_{n})\vec{v}_{y,z}^{\mathrm{max}}$
(VII.2.1)
$\displaystyle=\mu_{y}^{\mathrm{max}}+\mu_{y}^{\mathrm{max}}[\vec{v}_{y,z}^{\mathrm{max}}]^{\intercal}(\hat{T}_{z}-\hat{1}_{n})\vec{v}_{y,z}^{\mathrm{max}},$
(VII.2.2)

where $\hat{1}_{n}$ is the $n\times n$ identity matrix and
$\vec{v}_{y,z}^{\mathrm{max}}$ satisfies
$\hat{M}_{y}\vec{v}_{y,z}^{\mathrm{max}}=\mu_{y}^{\mathrm{max}}\vec{v}_{y,z}^{\mathrm{max}}$
and
$\|\vec{v}_{y,z}^{\mathrm{max}}\|_{1}=\|\vec{v}_{y,z}^{\mathrm{max}}\|_{2}=1$.
Note that the above approximation is valid when
$T_{z}(x|x^{\prime})\approx\delta_{x,x^{\prime}}$. Here,
$\delta_{x,x^{\prime}}$ is the Kronecker delta function.

As we explained, the Clausius inequality, Eq. (III.2.2), is a bound when we
adopt a $z$-dependent transition matrix $T_{z}(x|x^{\prime})$, and Eq.
(VII.1.1) is a looser bound defined by the maximum duplication growth rate.
The gap between Eqs.(VI.0.1) and (VII.1.1) to the first-order perturbation is
the summation of the second term of Eq. (VII.2.2) for $\tau=1,2,\dots,t$, and
it clearly shows that, by considering the phenotype-switching rate described
by $T_{z}(x|x^{\prime})$, we can obtain a tighter bound for the growth rate.

###  VII.3 Relation with the case without information

Until now, we have considered the case in which we can utilize information on
environments. Let us consider organisms that cannot sense their environments,
that is, the case of a fixed transition matrix. Then, the Clausius inequality,
Eq. (III.2.2) becomes

$\displaystyle\Phi_{0\to t}^{\mathrm{ex},\text{(w/o info)}}$
$\displaystyle\leq S_{y_{t},c}-S_{y_{0},c},$ (VII.3.1)

where $\Phi_{0\to t}^{\mathrm{ex},\text{(w/o info)}}$ is excess growth, Eq.
(II.6.3), in the case of $C_{0\to t}\coloneqq\\{c\\}_{\tau=1}^{t}$ and $c$ is
a constant that does not depend on $\tau$. This result is equivalent with Ref.
[32].

###  VII.4 Expectation of the Clausius inequality

The Clausius inequality, Eq. (III.2.2) is the inequality for each realization
of ${Y_{0\to t}}$ and ${Z_{0\to t}}$; so its expected value is easily computed
as

$\displaystyle\langle\Phi_{0\to t}\rangle_{p({Y_{0\to t}},{Z_{0\to t}})}$
$\displaystyle\leq\langle\Phi_{0\to t}^{\mathrm{hk}}\rangle_{p({Y_{0\to
t}},{Z_{0\to t}})}+\langle S_{y_{t},z_{t}}\rangle_{p(y_{t},z_{t})}-\langle
S_{y_{0},z_{0}}\rangle_{p(y_{0},z_{0})}.$ (VII.4.1)

Here $p(y_{\tau},z_{\tau})$ is the distribution of $y_{\tau}$ and $z_{\tau}$.
From the viewpoint of experimental verifications, Eq. (VII.4.1) may be more
convenient than the Clausius inequality, Eq. (III.2.2).

##  VIII Conclusions

In this paper, we have constructed an SST structure with side information in
population dynamics and derived novel relations, the Clausius equality and
inequality. First, we defined population growth of organisms and divided it
into two parts: housekeeping growth and excess growth. Then we showed that
excess growth is bounded by the difference of path-independent quantities,
which we call the pseudo-entropy, at the beginning and end. We also performed
numerical simulations to confirm our findings with several different setups.
Finally, we explained the relationship between our findings and previous ones
and discussed their novelties. To the best of our knowledge, this paper has
found an SST structure with side information in interdisciplinary sciences for
the first time.

###### Acknowledgements.

H.M. thanks Kiyoshi Kanazawa, Yuki Sughiyama, and Tetsuya J. Kobayashi for
fruitful discussions.

##  Appendix A Non-negativity of the symmetrized divergence

We show that $D_{0\to t}^{\mathrm{sym}}$ in Eq. (V.1.34) is non-negative. The
proof is as follows:

$\displaystyle D_{0\to t}^{\mathrm{sym}}$
$\displaystyle=\int\mathcal{D}X_{0\to t}\,p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})\ln\frac{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{\big{[}p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to t}^{\mathrm{r}},Z_{0\to
t}^{\mathrm{r}})\big{]}^{\frac{1}{2}}}$ (A.0.1)
$\displaystyle=\int\mathcal{D}X_{0\to t}\,p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})\ $ $\displaystyle\quad\times\bigg{(}\ln p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})-\frac{1}{2}\ln p_{\mathrm{r}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})-\frac{1}{2}\ln p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})\bigg{)}$ (A.0.2)
$\displaystyle=-\frac{1}{2}\int\mathcal{D}X_{0\to t}\,p_{\mathrm{b}}(X_{0\to
t}|Y_{0\to t},Z_{0\to t})\ln\frac{p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})}{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to t})}$
$\displaystyle\quad-\int\frac{1}{2}\mathcal{D}X_{0\to
t}\,p_{\mathrm{b}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})\ln\frac{p_{\mathrm{dr}}(X_{0\to t}^{\mathrm{r}}|Y_{0\to
t}^{\mathrm{r}},Z_{0\to t}^{\mathrm{r}})}{p_{\mathrm{b}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})}$ (A.0.3) $\displaystyle\geq-\frac{1}{2}\int\mathcal{D}X_{0\to
t}\,p_{\mathrm{r}}(X_{0\to t}|Y_{0\to t},Z_{0\to
t})-\frac{1}{2}\int\mathcal{D}X_{0\to t}\,p_{\mathrm{dr}}(X_{0\to t}|Y_{0\to
t},Z_{0\to t})$ (A.0.4) $\displaystyle=0.$ (A.0.5)

Note that we have used Jensen’s inequality.

## References

  * Jarzynski [1997a] C. Jarzynski, Nonequilibrium equality for free energy differences, Phys. Rev. Lett. 78, 2690 (1997a).
  * Jarzynski [1997b] C. Jarzynski, Equilibrium free-energy differences from nonequilibrium measurements: A master-equation approach, Phys. Rev. E 56, 5018 (1997b).
  * Crooks [1999] G. E. Crooks, Entropy production fluctuation theorem and the nonequilibrium work relation for free energy differences, Phys. Rev. E 60, 2721 (1999).
  * Crooks [1998] G. E. Crooks, Nonequilibrium measurements of free energy differences for microscopically reversible markovian systems, Journal of Statistical Physics 90, 1481 (1998).
  * Seifert [2012] U. Seifert, Stochastic thermodynamics, fluctuation theorems and molecular machines, Reports on Progress in Physics 75, 126001 (2012).
  * Sagawa and Ueda [2008] T. Sagawa and M. Ueda, Second law of thermodynamics with discrete quantum feedback control, Phys. Rev. Lett. 100, 080403 (2008).
  * Sagawa and Ueda [2009] T. Sagawa and M. Ueda, Minimal energy cost for thermodynamic information processing: Measurement and information erasure, Phys. Rev. Lett. 102, 250602 (2009).
  * Sagawa and Ueda [2010] T. Sagawa and M. Ueda, Generalized jarzynski equality under nonequilibrium feedback control, Phys. Rev. Lett. 104, 090602 (2010).
  * Sagawa [2017] T. Sagawa, Second law, entropy production, and reversibility in thermodynamics of information, arXiv preprint arXiv:1712.06858 (2017).
  * Parrondo  _et al._ [2015] J. M. Parrondo, J. M. Horowitz, and T. Sagawa, Thermodynamics of information, Nature physics 11, 131 (2015).
  * Miyahara and Aihara [2018] H. Miyahara and K. Aihara, Work relations with measurement and feedback control on nonuniform temperature systems, Phys. Rev. E 98, 042138 (2018).
  * Oono and Paniconi [1998] Y. Oono and M. Paniconi, Steady state thermodynamics, Progress of Theoretical Physics Supplement 130, 29 (1998).
  * Speck and Seifert [2005] T. Speck and U. Seifert, Integral fluctuation theorem for the housekeeping heat, Journal of Physics A: Mathematical and General 38, L581 (2005).
  * Esposito and Van den Broeck [2010] M. Esposito and C. Van den Broeck, Three detailed fluctuation theorems, Phys. Rev. Lett. 104, 090601 (2010).
  * Chetrite and Gawȩdzki [2008] R. Chetrite and K. Gawȩdzki, Fluctuation relations for diffusion processes, Communications in Mathematical Physics 282, 469 (2008).
  * Sekimoto [1998] K. Sekimoto, Langevin equation and thermodynamics, Progress of Theoretical Physics Supplement 130, 17 (1998).
  * Sasa and Tasaki [2006] S.-i. Sasa and H. Tasaki, Steady state thermodynamics, Journal of statistical physics 125, 125 (2006).
  * Komatsu  _et al._ [2008] T. S. Komatsu, N. Nakagawa, S.-i. Sasa, and H. Tasaki, Steady-state thermodynamics for heat conduction: microscopic derivation, Physical review letters 100, 230602 (2008).
  * Komatsu and Nakagawa [2008] T. S. Komatsu and N. Nakagawa, Expression for the stationary distribution in nonequilibrium steady states, Phys. Rev. Lett. 100, 030601 (2008).
  * Sagawa and Hayakawa [2011] T. Sagawa and H. Hayakawa, Geometrical expression of excess entropy production, Phys. Rev. E 84, 051110 (2011).
  * Kussell and Leibler [2005] E. Kussell and S. Leibler, Phenotypic diversity, population growth, and information in fluctuating environments, Science 309, 2075 (2005), https://science.sciencemag.org/content/309/5743/2075.full.pdf .
  * Leibler and Kussell [2010] S. Leibler and E. Kussell, Individual histories and selection in heterogeneous populations, Proceedings of the National Academy of Sciences 107, 13183 (2010), https://www.pnas.org/content/107/29/13183.full.pdf .
  * Hermisson  _et al._ [2002] J. Hermisson, O. Redner, H. Wagner, and E. Baake, Mutationâselection balance: Ancestry, load, and maximum principle, Theoretical Population Biology 62, 9 (2002).
  * Georgii and Baake [2003] H.-O. Georgii and E. Baake, Supercritical multitype branching processes: the ancestral types of typical individuals, Advances in Applied Probability 35, 1090 (2003).
  * Baake  _et al._ [2005] E. Baake, M. Baake, A. Bovier, and M. Klein, An asymptotic maximum principle for essentially linear evolution models, Journal of mathematical biology 50, 83 (2005).
  * Baake and Georgii [2007] E. Baake and H.-O. Georgii, Mutation, selection, and ancestry in branching models: a variational approach, Journal of mathematical biology 54, 257 (2007).
  * Sughiyama  _et al._ [2015] Y. Sughiyama, T. J. Kobayashi, K. Tsumura, and K. Aihara, Pathwise thermodynamic structure in population dynamics, Physical Review E 91, 032120 (2015).
  * Cover and Thomas [2012] T. M. Cover and J. A. Thomas,  _Elements of information theory_ (John Wiley & Sons, 2012).
  * Kobayashi and Sughiyama [2015] T. J. Kobayashi and Y. Sughiyama, Fluctuation relations of fitness and information in population dynamics, Physical Review Letters 115, 238102 (2015).
  * Kobayashi and Sughiyama [2017] T. J. Kobayashi and Y. Sughiyama, Stochastic and information-thermodynamic structures of population dynamics in a fluctuating environment, Physical Review E 96, 012402 (2017).
  * Miyahara [2019] H. Miyahara, Many-body perturbation theory and fluctuation relations for interacting population dynamics, Phys. Rev. E 99, 042415 (2019).
  * Sughiyama and Kobayashi [2017] Y. Sughiyama and T. J. Kobayashi, Steady-state thermodynamics for population growth in fluctuating environments, Physical Review E 95, 012131 (2017).
  * Levien  _et al._ [2020] E. Levien, T. GrandPre, and A. Amir, Large deviation principle linking lineage statistics to fitness in microbial populations, Phys. Rev. Lett. 125, 048102 (2020).
  * Kwon and Park [2021] S. Kwon and J.-M. Park, Derivation of evolutionary entropy in the steady-state thermodynamics of evolutionary dynamics, Phys. Rev. E 103, 062405 (2021).
  * Nozoe  _et al._ [2017] T. Nozoe, E. Kussell, and Y. Wakamoto, Inferring fitness landscapes and selection on phenotypic states from single-cell genealogical data, PLoS genetics 13, e1006653 (2017).
  * Genthon and Lacoste [2020] A. Genthon and D. Lacoste, Fluctuation relations and fitness landscapes of growing cell populations, Scientific Reports 10, 1 (2020).
  * Note [1] The pseudo-entropy (III.1.3) is not the entropy, but in our framework, it plays an important role similar to the entropy in thermodynamics; so we call it the pseudo-entropy.


# FLOSS != GitHub: A Case Study of Linux/BSD Perceptions from Microsoft’s
Acquisition of GitHub

Raula Gaikovina Kula1, Hideki Hata1, Kenichi Matsumoto1
1Nara Institute of Science and Technology, Japan
{raula-k, hata<EMAIL_ADDRESS>
###### Abstract

In 2018, the software industry giants Microsoft made a move into the Open
Source world by completing the acquisition of mega Open Source platform,
GitHub. This acquisition was not without controversy, as it is well-known that
the free software communities includes not only the ability to use software
freely, but also the libre nature in Open Source Software. In this study, our
aim is to explore these perceptions in FLOSS developers. We conducted a survey
that covered traditional FLOSS source Linux, and BSD communities and received
246 developer responses. The results of the survey confirm that the free
community did trigger some communities to move away from GitHub and raised
discussions into free and open software on the GitHub platform. The study
reminds us that although GitHub is influential and trendy, it does not
representative all FLOSS communities.

##  I Introduction

Microsoft’s GitHub is now reported to support a community where more than 40
million people learn, share, and work together to build software. The git-
based platform has grown to around 100 million repositories and has released
some of the world’s most influential technologies, such as React Native by
Facebook, Tensorflow by Google, and Swift by Apple just to name a few. GitHub
is based on social coding, which introduces online collaborations to attract
and sustain developers to a project [1]. In June of 2019, Tidelift and The New
Stack jointly fielded a survey of professional software developers to show
that most developers (84%) view themselves as active contributors to open-
source projects [2].

On October 26th 2018, Microsoft announced on its official blog that it had
completed its acquisition of GitHub [3]. In a blog Nat Friedman outlined two
principles for GitHub [4]:

  1. 1.

GitHub will operate independently (from Microsoft) as a community, platform,
and business. This means that GitHub will retain its developer-first values,
distinctive spirit, and open extensibility.

  2. 2.

GitHub will retain its product philosophy. We love GitHub because of the deep
care and thoughtfulness that goes into every facet of the developer’s
experience.

With these statements, GitHub confirms its intention to retain and grow its
base of Open Source developers.

From a traditional point of view, the free software community represents a
different aspect of the open source software community. It is described as a
campaign for computer users’ freedom and the open source camp that only focus
on practical benefits of software. To be fair to all camps, we use the term
“FLOSS,” meaning “Free/Libre and Open Source Software” [5]. Although the free
software community has had its share of disagreements with Microsoft [6, 7, 8,
9], the only reported negative opinion of free software community has
different attitudes towards GitHub is the idea of ‘forking’ so far, as it it
is considered as a danger to FLOSS development [10].

In this paper, we report on how external events such as acquisition of the
open source platform by a closed source organization triggers a FLOSS
developers such the Linux/ BSD Free Software communities.

TABLE I: Targeted Linux Distributions and BSD Communities Channel | Communities
---|---
Forums | Mint, Manjaro,Debian, Solus, Antergos, openSUSE, MX Linux, Zorin, Arch, ReactOS, Lite, Puppy
| FreeBSD, SparkyLinux, Slackware, Xubuntu, Devuan, Bodhi, Gentoo, Kubuntu,
Sabayon, KNOPPIX, 4MLinux, Tiny Core
| ClearOS, GhostBSD, NixOS, Ubuntu Studio, NuTyX, wattOS, LibreELEC, Trisquel,
siduction, Porteus, Elive, Scientific
| Parabola, Maui, Zenwalk, BunsenLabs, Void, Artix, Salix, Pardus, FreeNAS,
Pinguy, NAS4Free, IPFire
| OpenMediaVault, pfSense, Fatdog64, Neptune, SUSE, VyOS, MiniNo, Arya, Runtu,
Peach OSI, SalentOS, Zevenet
| 3CX, NethServer, Wifislax, ArchStrike, Porteus Kiosk, Funtoo, KXStudio,
Freespire, OviOS, Haiku, Pearl, Karoshi
| MINIX, Untangle, LinuxBBQ, Refracta, BigLinux, HardenedBSD, PrimTux,
EasyNAS, MidnightBSD, Toutou, TurnKey, DietPi
| KANOTIX, Cucumber, Linspire, AsteriskNOW, RISC, CloudReady, Rebellin,
RaspBSD, Springdale, Securepoint, PLD, SME Server
| Swift, TalkingArch, NexentaStor, SMS, Ulteo, Volumio, SuliX, Webconverger,
DRBL, Dragora, UBports, Liquid Lemur
| AIO, SuperGamer, Namib, Obarun
Mailing List | Debian, Fedora, LXLE, ROSA, DragonFly, Calculate, OpenMandriva, IPFire, SliTaz, NetBSD, Uruk, CRUX
| heads, Debian Edu, Endian, OSGeo, LuninuX, Whonix
| APODIO, Rocks Cluster, Clear, Lunar, Frugalware, GoboLinux
| MirOS, Super Grub2, Bio-Linux, GuixSD, Rescatux, gNewSense
| Exherbo, Thinstation, Vine, BSDRP, OLPC, T2
| Grml, Swecha
TABLE II: Questions that were asked to the Respondents

| Survey Questions to be answered using a Likert Scale Ranking
---|---
Respondents | 1\. Do you think it would be a good idea to move the project away from GitHub?
that remain on GitHub | 2\. If the project will be moved away from GitHub to another platform, how much
| additional effort will be required to get accustomed to the new platform?
| 3\. If you have any specific comments, please feel free to add here
(Optional)
Respondents | 1\. How much do you think this decision to move away from GitHub was related to the acquisition?
that moved away | 2\. Do you agree with the decision to move the distribution away from GitHub?
from GitHub | 3\. Does moving away from GitHub affects your contributions to this project?
| 5\. How much additional effort will be required to get accustomed to the new
platform?
| 4\. If you have any specific comments, please feel free to add here
(Optional)
Respondents | 1\. Do you think it would be a good idea to move the project to GitHub?
that do not use GitHub | 2\. If the distribution/kernel will be moved to GitHub, how much additional
| effort will be required to get accustomed to the new platform?
| 3\. Apart from Linux and BSD contributions, have you had personal
experiences with using GitHub?
| 4\. If you have any specific comments, please feel free to add here
(Optional)
Open-end feedback | 1\. If you have any generic comments, please feel free to add here (Optional).

##  II Target Subjects and Survey Design

Table I shows a listing of the targeted subjects for the study. It is
important to note that our survey results do not represent the perceptions of
all FLOSS developers. Instead is only contains a targeted subset of
contributors of Linux distributions/kernel and BSD families to infer the
opinion of traditional FLOSS development communities. We distributed our
survey via two lesser intrusive communication channels: i. Forums. Our attempt
to use the forums was to follow developer communication channels. In this
case, we posted in the more generic and random channels. ii. Mailing Lists. In
the absence of a forum, we reverted to a mailing list. Since the mailing lists
are curated, we had to request the mediating curator for permission before
posting the survey.

Table II outlines the structure of the questionnaire we designed our online
form. The survey was broken into three main sections, that were based on the
respondents activities after the acquisition and are listed below:

  * •

Remaining on GitHub This section would be filled out by respondents that had
GitHub projects and would continue to use GitHub after news of the
acquisition.

  * •

Moved away from GitHub This section would be filled out by respondents that
moved away from GitHub after news of the acquisition.

  * •

Never used GitHub This section would be filled out by respondents that have
never used GitHub.

Finally, we asked all respondents to provide additional open-ended feedback on
the acquisition. The intention was to later classify whether or not the
feedback was positive, neutral or negative.

TABLE III: Demographics and Perspective of Linux or BSD Distribution respondents. Respondents can choose more than one demographic. Demographic (multiple choice allowed) | # of Respondents
---|---
Casual contributors | 149
Core contributors | 64
Project manager/team leader | 47
Others | 16
Perspective |
Remain on GitHub | 138 (56%)
Moved Away from GitHub | 75 (31%)
Do not use GitHub | 33 (13%)
TOTAL | 246 (100%)

###  II-A Participant Demographics

Table III depicts the total respondents to our survey, totalling to 246 total
responses. Considering that we used developer communication channels for our
survey, it was interesting that the responses were mainly filled out by many
causal contributors (149). This was followed by core contributors (64) and
then the project manager/leader (47). Before we proceeded, we asked
participants on their impressions of GitHub. We found that 63% of the
respondents were fans of GitHub. A majority of the respondents either agreed
(46%) or had not opinion (20%) whether ‘GitHub appeals with access to over 27
million users’. Likewise many agreed (58%) that GitHub has a useful set of
functions for developers. However, developers were not ready to openly compare
GitHub when compared to similar platforms, with 59% of developers not agreeing
or having no opinion on whether GitHub is the superior platform.

We report that over half of respondents (55%) claim that the acquisition would
be detrimental to their GitHub projects. Furthermore, most respondents
negatively responded to the possibility of an expansion of Free and Open
source contributors (74%), and about half of the respondents (45%) did not
think the acquisition would bring improvements, reliability, and services with
the platform.

##  III Survey Findings

Based on the questionnaire, we first analysed all answers according the
perspective and then conducted a deeper analysis of the open-ended optional
comments.

###  III-A Feedback based on Perspective

As shown in Table III, we found that over half of our respondents did not move
away from GitHub (138, 56%), while a third of the respondents already had
their projects move away from GitHub (75, 31%). Finally, there was a smaller
number of respondents that did not host any of their projects on GitHub (33,
13%).

For developers that are currently contributing to GitHub, 33% of respondents
thought it was a bad idea for their projects to move. In terms of the
additional effort required to move, there was mixed responses, with no clear
majority.

For the developers that had any of their projects migrate away, the majority
completely agreed (65%) with the decision to move and were sure that the
acquisition was the key motivation (59%). Interestingly, when asked about how
the move would affect their contributions, developers were less forthcoming
with 53% either neutral or having no opinion. Still developers were more
optimistic with the move, with a majority of 36% confident that no additional
effort would be required to get accustomed to the new platform.

For the developers that never contributed to any GitHub projects, 80% thought
that moving to GitHub was not a good idea. In terms of the effort required, a
significant number of respondents (29%) had no opinion, while 48% reported
that it would take them much effort to get accustomed. That being said, a
majority (65%) of these developers had other open source of personal projects
on GitHub.

Takeaway 1: Some of the responded developers of the Linux and BSD distribution
had left GitHub or had not used GitHub, although the majority continued using
GitHub. Developers that stayed with GitHub did not cite that additional effort
is not a reason why they remained with GitHub.

###  III-B Open-end Feedback

We also collected all open-end comments (optional) and manually categorized
the reasons based on their polarity of their sentiments (i.e., positive,
neutral or negative). Out of the 70 responses, we were removed 9 responses
that were not relevant, leaving 61 sentences.

#### Positive Responses

We find 3 respondents that were in favor of the acquisition, stating that

> ‘Microsoft brings money, money means stable and reliable hosting of our
> source code’

As has been reported in previous studies, innovative services are the key to
sustainable projects [11]. Other sentiments includes the statement that ‘It’s
useful for mirrors in order to make it easy for drive-by contributors’ and
that it is convenient, stating that ‘I don’t see anything wrong with buying
Github by Microsoft. For example, we use Skype so far and we will continue to
use it until it suits our needs, or until we do something relatively
convenient for us.’

#### Neutral Responses

For the 28 respondents, they were not as concerned of the acquisition as much,
citing other alternative platforms such as GitLab or that ‘It’s easy to
migrate to other git hosting platforms, but that’s not needed right now for
me.’ From this point of view, respondents did cite the benefits of using
GitHub because of its huge userbase,

> ‘The problem is, if too much devs move to other platforms, then the greatest
> benefit of GitHib (easy cross-contribution and linking between different
> projects) will be lost. Thus follow the herd ;).’

Another respondent expressed that the strong support ‘Github has strong
support for SaaS integration (CI/CD services in particular), but these
services are provided by third parties. Github’s competitors .. provide CI/CD
functionality as part of their packages which would probably make me decide to
use them instead of Github if I had to set up a new user account right now.”
and yet another ‘Imho GitLab is superior in parts of functionality but is
still lacking the userbase.’

Other respondents cited that GiHub was not their primary source, thus did not
see any immediate threat. For example, one respondent stated that ‘FreeBSD
doesn’t use GitHub as its primary source anyway’ and that it was too early to
see any affect, ‘Practically speaking, nothing has changed yet. We are not
even talking about predictions, but about “gut feelings”’. As mentioned by a
Debian developer:

> ‘The Debian project had always been in favour of not using services running
> on infrastructure that is not managed by Debian. Impact to the project has
> been minimal as we had already our own infrastructure (Alioth recently
> migrated to salsa.debian.org, our own gitlab infrastructure). Debian is used
> to handling upstream developers using many different forges (Sourceforge,
> Savannah, GitHub, Gitlab) and the impact of upstream moving from GitHub to
> GitSalsa has not been significant.’

This sentiment can be seen in other responses that state that ‘The ownership
of GitHub is not relevant at all.’. Overall, there is divided feelings, even
within the teams:

> ‘Many team members are not concerned about the use of Github, and the
> convenience of the features on Github are useful. Visibility of the project
> (example Mapserver) is very important to some team leaders, and there is no
> replacement. We at OSGeo dot org have already built our own git server, and
> it is popular in our group.. the content of the projects is perfectly
> mirrored, but the tickets and PR history does not port. Some people have
> found tools to migrate away from Github, but it has not happened in general.
> The opinions about this are very divided, with strong feelings on different
> sides.’

In fact, respondents were quick to remark that GitHub is propriety.

> ‘The problem is NOT GitHUB-Microsoft deal but more general, a small example:
> in the past we (nearly) all use usenet. There are TONS of newserver around
> the world, anyone can host another if he or she want. There are plenty of
> groups some fun, some about sport, some about work, some to help others,
> some to discuss new ideas, … today we have FEW non-integrated proprietary
> platforms (from Fb to StackExchange to Reddit to 4Chan, YC, … all of them
> are POOR replacements of ancient ng. All of them are proprietary and depend
> on a single company.’

However, being propriety itself had mixed feelings, with one respondent
stating that: ‘This has always been a proprietary service using open source
technologies. The owner doesn’t really matter to me as long as they don’t mess
with code or visibility of projects for business purposes’.

#### Negative Responses

We found 30 negative responses, which expressed a distrust of a closed source
to merge with an open source. For example,

> ‘A Platform to develop OpenSource software cannot be controlled by King of
> closed source software. It’s a contradiction.’

Similar responses where expressed by respondents, even if there was no
grounds. For example,

> ‘It’s quite hard for me to trust Microsoft, they’re probably still planning
> to EEE stuff - even a ”harmless” tiger raised in captivity will still bite’

Ideas of freedom, in terms of both legal and that it could have an effect on
the quality of the code. Such concerns arised with a respondent that stated
that ‘.. the ability to change the foundations and the fundamentals of your
project by using terms and conditions will result in a poorer product and more
people worried about legal implications instead of writing code.’. Another
respondent was concerned with the idea of a monoculture, stating that

> ‘Monocultures are to be avoided, GitHub should simply be one of a number of
> similar projects to be used by software projects.’

This is supported by another respondent that ‘”GitHub is a centralised,
proprietary platform and always has been’. Another respondent was abit less
direct, stating that ‘I prefer free and open tools’. Another yet, stated how
it impedes competitive software (sw), ‘MS will impede development of
competitive sw to MS products’.

Finally, there were statements that directly referenced the freedom of open
source in their response, stating that:

> ‘Today and not since today our freedom is getting smaller and smaller from
> the hardware (UEFI (in)secure-boot etc) to services (how many people instead
> of have a local maildir sync-ed, for instance, only live on webmails?) to
> the society in general’

Takeaway 2: We found that the theme of the free-nature of Open Source,
especially in regards to GitHub Open Source projects was raised during the
discussion of the acquisition.

##  IV A Year Follow-up

We contacted a subset of the developers on November 12th 2019 to confirm the
results and survey their stance, a year after the acquisition and first
survey. The main goal was to confirm our findings by asking the single
question: After one year, has your perception on Microsoft’s acquisition of
GitHub changed? Out of the 16 emails sent out to the respondents, we received
4 responses.

We found that all respondents had unchanged sentiments towards the
acquisition, with stronger conviction on the violation of freedom. One
interesting response we found that GitHub should not be a reflection of all
Open Source:

> ‘All development of open source is happening on Github - therefore Github =
> Open Source and that I have heard not once but many times and I have also
> heard Git = Github’

Furthermore, the social impact of GitHub on the Open Source community is a
concern for a free community developer.

> ‘What many open source developers see in Github and many other services is a
> free lunch which they are so it’s hard to argue about that. It’s a free
> lunch that encourages you to market the free lunch and that you are almost
> an outcast if you aren’t. “Hey why aren’t you putting the github link on
> your page? Don’t you know all open source happens on GitHub?”’

Takeaway 3: The acquisition provides a reminder to acknowledge the existence
of FLOSS Communities that reside outside the GitHub Platform.

##  V Closing Remarks

We understand and acknowledge that our survey may only represent a small
fraction of the free community of traditional Open Source software, but it is
a good indicator that the freedom community is still active. Looking forward,
we recognize that although GitHub hosts influential and exciting part of Open
Source, it is a reminder that GitHub is not always a representative FLOSS.

## References

  * [1] R. G. Kula and G. Robles, _The Life and Death of Software Ecosystems_. Singapore: Springer Singapore, 2019, pp. 97–105.
  * [2] Tidelift, “The 2019 tidelift managed open source survey results,” https://cdn2.hubspot.net/hubfs/4008838/Resources/The-2019-Tidelift-managed-open-source-survey-results.pdf, 2019\.
  * [3] M. C. Blogs, “Microsoft completes github acquisition,” https://blogs.microsoft.com/blog/2018/10/26/microsoft-completes-github-acquisition/, 2018\.
  * [4] N. Friedman, “Pull request successfully merged. starting build…,” https://github.blog/2018-10-26-github-and-microsoft/, 2018.
  * [5] R. Stallman, “Floss and foss,” https://www.gnu.org/philosophy/floss-and-foss.en.html.
  * [6] M. Barr, “Microsoft and interactive television,” https://www.embedded.com/microsoft-and-interactive-television/, 2013.
  * [7] Wikipedia, “Free software foundation anti-windows campaigns,” https://en.wikipedia.org/wiki/Free_Software_Foundation_anti-Windows_campaigns.
  * [8] C. Tozzi, “Free software foundation vs microsoft windows 8 “secure boot”,” https://www.channelfutures.com/open-source/free-software-foundation-vs-microsoft-windows-8-secure-boot, 2013\.
  * [9] J. Sullivan, “Fsf statement on microsoft joining the open invention network,” https://www.fsf.org/news/fsf-statement-on-microsoft-joining-the-open-invention-network, 2018\.
  * [10] J. Jiang, D. Lo, J. He, X. Xia, P. S. Kochhar, and L. Zhang, “Why and how developers fork what from whom in github,” _Empirical Softw. Engg._ , vol. 22, no. 1, p. 547â578, Feb. 2017. [Online]. Available: https://doi.org/10.1007/s10664-016-9436-6
  * [11] H. Hata, T. Todo, S. Onoue, and K. Matsumoto, “Characteristics of sustainable oss projects: A theoretical and empirical study,” in _2015 IEEE/ACM 8th International Workshop on Cooperative and Human Aspects of Software Engineering_ , 2015, pp. 15–21.