††thanks: These authors contributed equally to this work.††thanks: These
authors contributed equally to this work.

# Remark on the Entropy Production
of Adaptive Run-and-Tumble Chemotaxis

Minh D. N. Nguyen  Department of Automation, School of Electrical and
Electronic Engineering,
Hanoi University of Science and Technology, Hanoi 100000, Vietnam.  Phuc H.
Pham  High School for Gifted Students, Hanoi University of Science, Vietnam
National University, 182 Luong The Vinh Str, Hanoi 100000, Vietnam.  Khang V.
Ngo  Ecole Polytechnique, Route de Saclay, Palaiseau 91120, France.  Van H. Do
Homer L. Dodge Department of Physics and Astronomy, University of Oklahoma,
440 W. Brooks St. Norman, OK 73019, USA.  Shengkai Li
<EMAIL_ADDRESS>Department of Physics, Princeton University,
Princeton, NJ 08544, USA.  Trung V. Phan<EMAIL_ADDRESS>Department of
Chemical and Biomolecular Engineering,
John Hopkins University, Baltimore, MD 21218, USA.

###### Abstract

Chemotactic active particles, such as bacteria and cells, exhibit an adaptive
run-and-tumble motion, giving rise to complex emergent behaviors in response
to external chemical fields. This motion is generated by the conversion of
internal chemical energy into self-propulsion, allowing each agent to sustain
a steady-state far from thermal equilibrium and perform works. The rate of
entropy production serves as an indicates of how extensive these agents
operate away from thermal equilibrium, providing a measure for estimating
maximum obtainable power. Here we present the general framework for
calculating the entropy production rate created by such population of agents
from the first principle, using the minimal model of bacterial adaptive
chemotaxis, as they execute the most basic collective action – the mass
transport.

##  I Introduction

Active matter are systems and materials made of autonomous energy-convertible
entities engaged in self-organized collective motions [1, 2, 3]. These
constituents can be diverse, ranging from biological organisms like bacteria
or cells [4], to synthetic constructs such as colloidal particles [5, 6],
robots [7, 8, 9], or even micro-robots [10]. Active particles operate in
states far from thermal equilibrium, maintaining motility and functionality
through the utilization of external forces, such as chemical gradients [11,
12] and temperature disparities [13, 14]. This capability enables these
particles to access and execute tasks in complex environments and intricate
geometries [15, 16] down to micron scales, where traditional energy sources
may be limited or impractical. Research in active matter holds immense promise
for a wide range of applications, including nano/biotechnology [17, 18],
medicine and health care [19, 20], the development of novel smart materials
with unique properties [21, 22], and energy harvesting [23, 24]. Understanding
and harnessing the physical principles underlying different families of active
matter is a key area of research with significant potential for scientific
discoveries and innovative technologies.

Quantifying extractable energy from active matter is of critical importance
for engineering applications, enabling performance assessments, guiding
optimal system designs, and facilitating comparative analysis. The actual
power generation value $\dot{E}$ depends on the chosen work-extraction
techniques, but a proportional estimation can be derived from the entropy
production rate $\dot{S}_{i}$, i.e. $\dot{E}\propto\dot{S}_{i}$ [25]. We can
intuitively understand how this relation emerges by noting that the entropy
production rate is a measure of departure from thermal equilibrium. When a
system is distant from equilibrium, it signifies the existence of gradients or
imbalances in energy transport within the system. These energy fluxes are what
allow for work extraction when we couple degrees of freedom in the system with
an external device, as outlined in [26]. We want to gauge $\dot{E}$, we need
to estimate $\dot{S}_{i}$. Given the typical complexity of interactions among
active particles, e.g. the emergence of non-reciprocity [27], simulations seem
to be the most practical approach [28]. Still, while physics in silico can
provide answers quickly, valuable insights might be overlooked [29].
Theoretical investigation from first principles allows for a more analytical
and deeper understanding of the mechanisms governing active matter behavior,
ensuring that engineering decisions are not only grounded in basic principles
but also generalizable and flexible across a broader range of uses and
settings.

The aim of this brief report is to demonstrate how the entropy production rate
can be derived from the first principles, for the “most elementary form of
active matter in nature”: chemotactic bacteria [30, 31, 32]. The behavior of
these bacteria can be conveniently controlled by manipulating visualizable
chemical concentrations, such as aspartate chemoattractants [33]. It should be
noted that, although there has been previous attempt in this direction, the
proposed estimation relies on a generic power-law assumption,
$\dot{S}_{i}\propto n^{\gamma}$ (where $n$ denotes bacterial density and
$\gamma$ is a constant exponent within the range of 0 to 1), without explicit
grounding in the underlying physics [34]. Here, we showcase a concrete roadmap
from the adaptive run-and-tumble model of chemotaxis [35, 36, 37] to the
analytical expression of $\dot{S}_{i}$ [26], during steady collective
migration [38, 39], which is arguably the most fundamental emergent behavior
of a biological population [40]. We start by constructing the Fokker-Planck
equation to describe the probability distribution of all available bacterial
motion states. We then introduce approximations using observations from wild-
type bacteria to render the analysis more tractable; this enables us to derive
an analytical solution that corresponds to steady collective transportation,
which violates time-reversal symmetry. Finally, through the calculation of the
time-irreversibility metric $\sigma$, we can establish a lower-bound
estimation for the rate of entropy production $\dot{S}_{i}$. For simplicity,
we only consider one-dimensional transport, but we mention how calculations
can be done similarly in physical three-dimensional space. We also relates our
estimated $\dot{S}_{i}$ with macroscopic quantities i.e. effective diffusivity
$\mu$ and chemotactic coefficient $\chi$ of the bacterial field-theoretic
dynamics as formulated in the Patlak-Keller-Segel partial differential
equation (PDE) [11, 41, 33].

##  II The Basics of Adaptive Run-and-Tumble Chemotaxis

For a mathematical description of how chemotactic agents response to external
chemical fields, let us utilize the minimal model of bacterial adaptive
chemotaxis [35, 36, 37]. In this model, we can describe the internal state of
each agent by a single scalar value $F$. Biochemically, this value $F(t)$
represents the free energy difference between the active and inactive states
of the bacterial receptors, measured in units of $k_{\text{B}}T$ (where
$k_{\text{B}}$ is the Boltzmann constant and $T$ is the temperature of the
environment). It quantifies the energy barrier or cost associated with
transitioning between these states, playing a crucial role in governing the
activity of these cooperative receptor clusters. Physically, this value $F(t)$
control the transition rates of switching from run to tumble
$\lambda_{\text{R}}$ and tumble to run $\lambda_{\text{T}}$:

$\lambda_{\text{T}}(f)=\frac{r(f)}{t_{\text{S}}}\ \ ,\ \
\lambda_{\text{R}}(f)=\frac{1-r(f)}{t_{\text{S}}}\ \ ,\ \
r(f)=\frac{1}{1+\exp\left(-f\right)}\ \ .$ (1)

Here we introduce $f=HF$, denoted as the gained internal state, where $H$
represents the flagella motor gain. This gain factor is determined by the
kinetics governing how the concentration of response regulator inside the
cell, controlled by receptor activity, binds to the flagellar motor complex.
Say, at time $t$, the bacteria is at the position $\vec{x}=\vec{x}(t)$, then
the rule for the adaptation of $F(t)$ follows:

$\frac{d}{dt}F(t)=\frac{F_{0}-F(t)}{t_{\text{M}}}+N\left[\partial_{t}+\frac{d}{dt}\vec{x}(t).\vec{\nabla}\right]\Phi\left[C\left(\vec{x},t\right)\right]\Big{|}_{\vec{x}=\vec{x}(t)}\
\ ,$ (2)

where $C(\vec{x},t)$ is the attracting chemical concentration and
$\Phi\left[C(\vec{x},t)\right]$ is the signal strength as perceived by the
bacterial receptors at that concentration value. Let us explain this
elaborated equation, which describes the internal state $F(t)$ rate of change
from two distinct contributions. The first term reflects an adaptation process
with a memory timescale $t_{\text{M}}$, governing the relaxation of $F(t)$
back to its innate value $F_{0}$. The second term outlines the updating
mechanism which depends directly on how the cell perceives changes in the
local environment over time $d\Phi/dt$, involving a gain factor $N$. It is
important to note that, the internal state as observed in nature can be much
more complicated, such as for E.coli bacteria, their internal state is often
specified by two scalar values [31, 42, 43].

When the agents run, we assume they always swim at a constant velocity
$v_{0}$; when bacteria tumble, they stop and reorient the swimming direction.
We consider a constant perceived signal gradient, so that the mass transport
of this population will have a constant collective drift-velocity:

$\Phi\left[C(\vec{x},t)\right]=\frac{z}{L}+\text{const}\ ,\ z=\vec{x}.\hat{z}\
\ \Longrightarrow\ \
\vec{\nabla}\Phi\left[C(\vec{x},t)\right]=\frac{\hat{z}}{L}\ \ ,$ (3)

in which $L$ represents the characteristic length of the gradient. For linear-
sensitive agents $\Phi(C)\propto C$, hence the chemical concentration is just
that of a constant slope. For log-sensitive agents $\Phi(C)\propto\ln(C)$ such
as E.coli bacteria when the chemical concentration is inside their natural
dynamical range, this setting corresponds to an exponential ramp
$C(\vec{x},t)\propto\exp(z/L)$ [44, 45, 36].

##  III A Steady Collective Transport

Figure 1: Schematic of the one-dimensional adaptive chemotaxis.

We can gain a lot of insights on the collective transport of adaptive
chemotactic agents by consider the situation effectively in one-dimensional
space. If the agents are only allowed to move in a single dimension, there are
only four states of locomotion (see Fig. 1):

  * •

State $\text{R}-$: swimming in the $\hat{z}^{-}$ direction. The probability
for a bacteria (at time $t$ located at position $x$, gained internal state
$f$), to be in this state, is $P_{\text{R}-}(t,z,f)$.

  * •

State $\text{T}-$: stopping while facing the $\hat{z}^{-}$ direction. The
probability for a bacteria (at time $t$ located at position $x$, gained
internal state $f$), to be in this state, is $P_{\text{T}-}(t,z,f)$.

  * •

State $\text{T}+$: stopping while facing the $\hat{z}^{+}$ direction. The
probability for a bacteria (at time $t$ located at position $x$, gained
internal state $f$), to be in this state, is $P_{\text{T}+}(t,z,f)$.

  * •

State $\text{R}+$: swimming in the $\hat{z}^{+}$ direction. The probability
for a bacteria (at time $t$ located at position $x$, gained internal state
$f$), to be in this state, is $P_{\text{R}+}(t,z,f)$.

Note that sum of all these probabilities should equal to unity:

$1=\sum^{\\{\text{R}-,\text{T}-,\text{T}+,\text{R}+\\}}_{\alpha}\int df\int
dz\int dtP_{\alpha}(t,z,f)\ \ .$ (4)

During stops, the facing direction can flip at a rate
$\lambda_{\text{F}}=1/t_{\text{F}}$, where $t_{\text{F}}$ is the average
flipping time. This value is an effective description, representing the
directional persistency, which can be identified with the average time it
takes for a $180^{o}$-angular change due to e.g. directional diffusion in
physical space (as we will discuss in section V). The set of Fokker-Planck’s
equations describing the evolution of these probabilities is given by:

$\begin{split}0=\
&\partial_{t}P_{R\mp}\left(t,z,f\right)+\partial_{z}\left[\mp
v_{0}P_{R\mp}\left(t,z,f\right)\right]+\partial_{f}\left[\left(\frac{f_{0}-f}{t_{\text{M}}}\mp\frac{NHv_{0}}{L}\right)P_{R\mp}\left(t,z,f\right)\right]\\\
+&\left[\lambda_{\text{R}}(f)P_{R\mp}\left(t,z,f\right)-\lambda_{\text{T}}(f)P_{T\mp}\left(t,z,f\right)\right]\
\ ,\\\ 0=\
&\partial_{t}P_{T\mp}\left(t,z,f\right)+\partial_{f}\left[\left(\frac{f_{0}-f}{t_{\text{M}}}\right)P_{T\mp}\left(t,z,f\right)\right]\\\
+&\left[\lambda_{\text{T}}(f)P_{T\mp}\left(t,z,f\right)-\lambda_{\text{R}}(f)P_{R\mp}\left(t,z,f\right)+\lambda_{\text{F}}P_{T\mp}\left(t,z,f\right)-\lambda_{\text{F}}P_{T\pm}\left(t,z,f\right)\right]\
\ .\end{split}$ (5)

We show how these PDEs can be constructed in Appendix A. Define the ratios
between time-scales:

$\tau_{\text{S}}=\frac{t_{\text{S}}}{t_{\text{M}}}\ \ ,\ \
\tau_{L}=\frac{L/NHv_{0}}{t_{\text{M}}}\ \ ,\ \
\tau_{\text{F}}=\frac{t_{\text{F}}}{t_{\text{M}}}\ \ .$ (6)

When the switching rates between run and tumble is very fast
$\tau_{\text{S}}\rightarrow 0$, we can assume to always have the equilibrium
$P_{\text{R}\mp}(t,z,f)\lambda_{\text{R}}(f)\approx
P_{\text{T}\mp}(t,z,f)\lambda_{\text{T}}(f)$. At the steady-state of
collective transport, the probability density becomes stationary and
homogeneous, thus we can drop the specifications $(t,x)$. If we define
$P_{\text{R}\mp}(f)+P_{\text{T}\mp}(f)=P_{\mp}(f)$, then we get
$P_{\text{R}\mp}(f)=r(f)P_{\mp}(f)$,
$P_{\text{T}\mp}(f)=\left[1-r(f)\right]P_{\mp}(f)$ and we can rewrite Eq. (5)
as:

$0\ =\
\partial_{f}\left\\{\left[\left(f_{0}-f\right)\mp\frac{r(f)}{\tau_{L}}\right]P_{\mp}\left(f\right)\right\\}+\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\left[P_{\mp}(f)-P_{\pm}(f)\right]\
\ .$ (7)

Note that, due to a finite swimming velocity, the available range for $f$
should be in between the values $f_{\mp}$ that satisfy:

$f_{\mp}=f_{0}\mp\frac{r(f_{\mp})}{\tau_{L}}\ \ .$ (8)

When the population is climbing up a weak-gradient, this range $[f_{-},f_{+}]$
should be small.

The two ODEs in Eq. (7) can be solved analytically. From the integration
$\Psi(f)$:

$\Psi(f)=\int^{f}df^{\prime}\left\\{\frac{2\left[1-r(f^{\prime})\right]}{\tau_{\text{F}}}\right\\}\left\\{\frac{\displaystyle(f^{\prime}-f_{0})}{\displaystyle\left[\frac{r(f^{\prime})}{\tau_{L}}\right]^{2}-(f^{\prime}-f_{0})^{2}}\right\\}\
,$ (9)

the probability distribution $P_{\pm}(f)$ can be written as:

$P_{\mp}(f)\propto\left\\{\left[\frac{r(f)}{\tau_{L}}\right]\pm\left(f-f_{0}\right)\right\\}^{-1}\exp\left[-\Psi(f)\right]\
\ .$ (10)

In the weak-gradient $1/L\rightarrow 0$ and fast-flipping direction limit,
this becomes:

$P_{\mp}(f)\propto\left[1\mp\left(\frac{f-f_{0}}{\alpha_{L}}\right)\right]\exp\left[-\frac{\alpha_{\text{F}}}{2}\left(\frac{f-f_{0}}{\alpha_{L}}\right)^{2}\right]\
,$ (11)

where the coefficients $\alpha_{L}$ and $\alpha_{\text{F}}$ are given by:

$\alpha_{L}=\frac{r(f_{0})}{\tau_{L}}\rightarrow 0\ \ ,\ \
\alpha_{\text{F}}=\frac{2\left[1-r(f_{0})\right]}{\tau_{\text{F}}}\gg 1\ .$
(12)

These are reasonable approximations, given that the length scale $L$ can be as
long as we want, and for wild-type E.coli bacteria, $r(f_{0})\sim 0.5$ to
$0.8$, $t_{\text{M}}\sim 10$s to $30$s, and the directional reversal timescale
$t_{\text{F}}\sim 1$s [44, 35], hence $\alpha_{\text{F}}$ can be as large as
$30$. We give the derivation for this solution and its approximation in
Appendix B. The peak positions of $P_{\mp}(f)$ distributions are located at
$f_{0}\mp\alpha_{L}/\alpha_{\text{F}}$, represents the expected bias for lower
internal state value for bacteria swimming down-gradient and higher internal
state value for bacteria swimming up-gradient. In other words, when bacteria
swim up the gradient, they tend to tumble less.

##  IV Entropy Production Rate

Figure 2: The collective transport of bacteria. The entropy production rate
$\dot{S}_{i}$ is quantified to be Eq. (16) at a gate where the energy can be
harvested, e.g. as described in [26].

An engineer-definition of entropy production should be associated with how
energy can be harvested out of the system. In [26], a physical method is
proposed for achieving this, involving a gate positioned perpendicular to the
collective travel direction of the chemotactic agents, as illustrated in Fig.
2. In this proposal, the power generated by the population $\dot{E}$ is
directly proportional to its entropy production rate $\dot{S}_{i}$, with the
coefficient of proportionality depending on the specific harvesting technique
employed. The entropy production rate can be estimated from the time-
irreversibility metric $\sigma$ and the number of events that agents swim pass
the gate per unit time $\Gamma$:

$\dot{S}_{i}\geq k_{\text{B}}\Gamma\sigma\ .$ (13)

The time-irreversibility metric $\sigma$ is calculated as the Kullback-Leibler
divergence between the probability density functions of the time-forward and
backward dynamics, quantifying how difference the collective behavior looks
when playing the observations forward and backward in time [25, 26, 46, 47,
48, 49, 50, 51, 52, 53].

Follow from Eq. (10), the probability for an agent swimming in the
$\hat{z}^{\mp}$ direction is given by integrating all possible values of the
internal state:

$\mathcal{P}_{\mp}=\int^{f_{+}}_{f_{-}}dfr(f)P_{\mp}(f)\approx\frac{1}{2}r(f_{0})\left(1\mp\frac{\alpha_{L}}{\alpha_{\text{F}}}\right)\
\ ,$ (14)

in which the approximation is calculated for the weak-gradient case. The time-
irreversibility metric can be calculated by the Kullback-Leibler divergence
between the probability density functions of chemotactic agents’ trajectories
in chronological and in reverse-chronological order:

$\sigma=\mathcal{P}_{+}\ln\frac{\mathcal{P}_{+}}{\mathcal{P}_{-}}+\mathcal{P}_{-}\ln\frac{\mathcal{P}_{-}}{\mathcal{P}_{+}}\approx
2r(f_{0})\left(\frac{\alpha_{L}}{\alpha_{\text{F}}}\right)^{2}\ .$ (15)

We derive these results in Appendix B.2.

Consider a population of chemotactic agents with particle density $n$ per
unit-length. At any point in space, the average rate of agents swimming pass
it in the $\hat{z}^{\mp}$ direction is $\mathcal{P}_{\mp}nv_{0}$, thus the
rate of gate-crossing events is
$\Gamma=\left(\mathcal{P}_{-}+\mathcal{P}_{+}\right)nv_{0}$. The entropy
production rate of this chemotactic population as they pass through the gate
shown in Fig. 2 can be estimated using Eq. (13):

$\dot{S}_{i}\geq
k_{\text{B}}\left[\left(\mathcal{P}_{-}+\mathcal{P}_{+}\right)nv_{0}\right]\left[2r(f_{0})\left(\frac{\alpha_{L}}{\alpha_{\text{F}}}\right)^{2}\right]\approx
k_{\text{B}}\left\\{2nv_{0}\left[r(f_{0})\frac{\alpha_{L}}{\alpha_{\text{F}}}\right]^{2}\right\\}\
.$ (16)

Here, we found that the entropy production rate is proportional to the density
of agents $n$, the inverse-squared of the directional flipping-rate
$\alpha_{\text{F}}^{-2}\propto\tau_{\text{F}}^{2}\propto\lambda_{\text{F}}^{-2}$,
and the squared of the perceived signal gradient
$\alpha_{L}^{2}\propto(1/L)^{2}$.

Now let us connect our finding to the field-theoretic formulation. The
diffusion coefficient $\mu$ and the chemotactic coefficient $\chi$ in the
Patlak-Keller-Segel PDE [11, 41, 33] are related to the parameters of adaptive
run-and-tumble chemotaxis:

$\mu=\left\\{\frac{r^{2}(f_{0})}{2\left[1-r(f_{0})\right]}\right\\}\frac{v_{0}^{2}}{\lambda_{\text{F}}}\
\ ,\ \ \chi=\left(NH\right)\mu\ \ ,$ (17)

which results we have derived in Appendix C.1. We can utilize this, along with
Eq. (6) and Eq. (12) to rewrite the expression for the entropy production rate
in Eq. (16):

$\dot{S}_{i}\geq\frac{2k_{\text{B}}}{v_{0}}\left(\left\\{NH\frac{r^{2}(f_{0})}{2[1-r(f_{0})]}\right\\}\frac{v_{0}^{2}}{\lambda_{\text{F}}}\right)^{2}\frac{n}{L^{2}}=\left(\frac{2k_{\text{B}}\chi^{2}}{v_{0}}\right)n\left(\nabla\Phi\right)^{2}\
\ .$ (18)

We find that the estimated entropy production rate $\dot{S}_{i}$ is
proportional to the density $n$ and the square of the perceived signal
gradient $\nabla\Phi$.

It should be noted that there exists a simple argument for $\dot{S}_{i}\propto
n\left(\nabla\Phi\right)^{2}$. Since the entropy of a classical system is an
additive quantity of its constituents, it is expected that $\dot{S}_{i}\propto
n$. If we further make a rather bold assumption that $\dot{S}_{i}$ is an
analytical function in $\nabla\Phi$, a trick often used by Landau on emergent
phenomena [54, 55], then around $\nabla\Phi=0$ we can approximate it with the
Taylor expansion power-series:

$\dot{S}_{i}\propto
s_{0}+s_{1}\left(\nabla\Phi\right)+s_{2}\left(\nabla\Phi\right)^{2}+s_{3}\left(\nabla\Phi\right)^{3}+...\
.$ (19)

When there is no gradient $\nabla\Phi=0$ to create a preference direction in
the environment, the flux of left-moving agents should equal to that of right-
moving agents, and therefore the dynamics should have time-reversal symmetry
$\dot{S}_{i}=0$ hence the constant term vanishes $s_{0}=0$. Also, from the
non-negativity of the entropy production $\dot{S}_{i}\geq 0$ no matter the
sign of $\nabla\Phi$, as followed from it being proportional to time-
irrerversibility metric which is a Kullback-Leibler divergence [25, 26], the
linear term must disappear $s_{1}=0$. So the first non-zero term should be at
least of the second order, which means that in the limit
$|\nabla\Phi|\rightarrow 0$, we must obtain
$\dot{S}_{i}\propto\left(\nabla\Phi\right)^{2}$. Therefore,
$\dot{S}_{i}\propto n\left(\nabla\Phi\right)^{2}$ is rather a reasonable
guess.

##  V Considerations in Physical Three-Dimensional Space

For a realistic transport in physical space, which has three dimensions, the
possible locomotion states of every agent are described by a continuous
angular variable $\theta\in[0,\pi]$ which measures the angle between the
facing direction and the uphill gradient direction $\hat{z}^{+}$, i.e.
$P_{\text{R}}(\theta,f)$ for a run and $P_{\text{T}}(\theta,f)$ for a tumble
at the steady-state, the combination
$P(\theta,f)=P_{\text{R}}(\theta,f)+P_{\text{T}}(\theta,f)$ and the running
probability $P_{\text{R}}\approx r(f)P(\theta,f)$. Due to a finite swimming
velocity, the available range for $f$ should be in between the values
$f_{\mp}$ that satisfy:

$f_{\mp}=f_{0}\mp\frac{r(f_{\mp})}{\sqrt{3}\tau_{L}}\ \ .$ (20)

Moreover, instead of simply flip the facing direction as in one-dimensional
space, the dynamics of reorientation depends on an angular diffusive timescale
$\tau_{\text{D}}(f)$:

$\tau_{\text{D}}(f)=\frac{t_{\text{D}}(f)}{t_{M}}\ \ ,\ \
t_{\text{D}}(f)=\Big{(}2\left\\{r(f)D_{\text{R}}+\left[1-r(f)\right]D_{\text{T}}\right\\}\Big{)}^{-1}\
\ ,$

where $D_{\text{R}}$ is the angular diffusivity during a run and
$D_{\text{T}}$ is the angular diffusivity during a tumble. This problem has
been considered in [35], required much more elaborated algebraic and
analytical manipulations but the finding, while not exactly the same, has
shared a lot of similar features to our effective one-dimensional toy-model,
by replacing $\tau_{\text{D}}(f)$ with $\tau_{\text{F}}$. In other words, our
model is a reasonable simplification of theirs.

The angular distribution $P(\theta,f)$ can be approximated by keeping the
lowest-order projections on its spherical harmonics expansion:

$P(\theta,f)\propto\left\\{\left[\frac{r(f)}{\sqrt{3}\tau_{L}}\right]+\left(f-f_{0}\right)\cos\theta\right\\}\left\\{\left[\frac{r(f)}{\sqrt{3}\tau_{L}}\right]^{2}-(f-f_{0})^{2}\right\\}^{-1}\exp\left[-\Psi(f)\right]\
\ ,$ (21)

in which we use the integration $\Psi(f)$:

$\Psi(f)=\int^{f}df^{\prime}\frac{1}{\tau_{D}(f^{\prime})}\left\\{\frac{\displaystyle(f^{\prime}-f_{0})}{\displaystyle\left[\frac{r(f^{\prime})}{\sqrt{3}\tau_{L}}\right]^{2}-(f^{\prime}-f_{0})^{2}}\right\\}\
\ .$ (22)

In the weak-gradient $1/L\rightarrow 0$ and rapid reorientation limit, this
becomes:

$P(\theta,f)\propto\left[1+\left(\frac{f-f_{0}}{\alpha_{L}}\right)\cos\theta\right]\exp\left[-\frac{\alpha_{\text{D}}}{2}\left(\frac{f-f_{0}}{\alpha_{L}}\right)^{2}\right]\
\ ,$ (23)

where the coefficients $\alpha_{L}$ and $\alpha_{\text{D}}$ are given by:

$\alpha_{L}=\frac{r(f_{0})}{\sqrt{3}\tau_{L}}\rightarrow 0\ \ ,\ \
\alpha_{\text{D}}=\frac{1}{\tau_{\text{D}}(f_{0})}\gg 1\ .$ (24)

These are reasonable approximations, given that the length scale $L$ can be as
long as we want, and for wild-type E.coli bacteria, $r(f_{0})\sim 0.5$ to
$0.8$, $t_{\text{M}}\sim 10$s to $30$s, $D_{\text{T}}\sim 2.2$rad2/s to
$4.4$rad2/s and $\gg D_{\text{R}}$ [56, 44, 35], hence it is possible for
$\alpha_{\text{D}}$ to be more than an order of magnitude higher than unity.
This is compatible with the coefficient of changing direction
$\alpha_{\text{F}}$ in the effective one-dimensional space as we has studied
in Section III. The most probable $\max_{f}P(\theta,f)$ distribution are
located at $f=f_{0}+(\alpha_{L}/\alpha_{\text{D}})\cos\theta$, represents the
directional bias for internal state value such that bacteria swimming up the
gradient tumble less frequent.

From here on, we only sketch the steps and provide answers. Follow from Eq.
(10), the probability for an agent swimming in the $\theta$-direction is given
by integrating all possible values of the internal state:

$\mathcal{P}(\theta)=\int^{f_{+}}_{f_{-}}dfr(f)P(\theta,f)\ \ ,$ (25)

in which the approximation is calculated for the weak-gradient case. The time-
irreversibility metric can be calculated by the Kullback-Leibler divergence
between the probability density functions of chemotactic agents’ trajectories
in chronological and in reverse-chronological order:

$\sigma=\int^{\pi}_{0}\sin\theta
d\theta\mathcal{P}(\theta)\ln\left[\frac{\mathcal{P}(\theta)}{\mathcal{P}(\pi+\theta)}\right]\approx\left\\{\frac{r(f_{0})\left[1+r(f_{0})\right]^{2}}{3\pi}\right\\}\left(\frac{\alpha_{L}}{\alpha_{\text{D}}}\right)^{2}\
\ .$ (26)

Consider the population density of $n$, corresponding to finding the average
of $n$ agents per unit-volume. Through any surface perpendicular to $\hat{z}$,
the average rate of agents swimming pass it per unit-area is given by:

$\Gamma=nv_{0}\int_{0}^{\pi}\sin\theta
d\theta\mathcal{P}(\theta)\left|\cos\theta\right|\approx
nv_{0}\left[\frac{r(f_{0})}{4\pi}\right]\ \ .$ (27)

The entropy production rate $\dot{S}_{i}$ of this chemotactic population per
unit-area can be estimated using Eq. (13):

$\dot{S}_{i}\geq
k_{B}\left(3nv_{0}\left\\{\frac{r(f_{0})\left[1+r(f_{0})\right]}{6\pi}\left(\frac{\alpha_{L}}{\alpha_{\text{D}}}\right)\right\\}^{2}\right)\
.$ (28)

To relate this finding with the diffusivity $\mu$ and chemotactic coefficient
$\chi$ in the Patlak-Keller-Segel field-theoretic model, we apply the results
of Appendix C.2 in the same way as how the answers of Appendix C.1 can be used
to derive Eq. (29). We obtain a similar expression:

$\chi=\left\\{NH\frac{r(f_{0})\left[1+r(f_{0})\right]}{2\sqrt{3}\pi}\right\\}\mu\
,\
\dot{S}_{i}\geq\left(\frac{3k_{\text{B}}\chi^{2}}{v_{0}}\right)n\left(\vec{\nabla}\Phi\right)^{2}\
\ .$ (29)

##  VI Discussion

We have demonstrated deriving the entropy production rate, from the first
principles for a population of agents engaged in adaptive chemotaxis. This is
done by utilizing a well-established relation between it and the time-
irreversibility metric [25, 26], which in turn can be calculated from the
probability distribution of all available locomotion states during a steady
mass migration. This probability distribution is the stationary solution of
the Fokker-Planck equation for an adaptive run-and-tumble random walk on a
static environment of constant perceived signal gradient, leading to an
unchanging average drift-velocity. Our bottom-up approach begins with the
basics of motility then works upwards to obtain analytical results in simple
regimes. While we focus on a one-dimensional space in our analysis, extending
these calculations to higher dimensions is straightforward. We reframe our
findings within the framework of the field-theoretic Patlak-Keller-Segel
model, in which the entropy production rate should be assessed based on the
effective diffusivity and the chemotactic coefficient of the whole
populations, rather than relying on the length and time scales associated with
bacterial trajectories.

We have only begun to delve into the depths of a potentially rich and profound
topic within theoretical biology. An important direction to explore in future
works is to consider how the bacteria influence the environment. Our
considerations for entropy production here works when the perceived signal
gradient $\vec{\nabla}\Phi$ can be considered not only flat but also quasi-
stationary, i.e. $|\partial_{t}\Phi|\ll v_{0}|\vec{\nabla}\Phi|$. For example,
collective transportation can emerge when bacteria chase after consumable
resource, in which the flatness of $\vec{\nabla}\Phi$ emerges after the peak
of the bacterial wave [33] and the quasi-stationary condition corresponds to
$\left|\langle\vec{v}\rangle\right|\ll v_{0}$, as the drift velocity is much
smaller than that of the swimming speed. This only holds true for small waves
of bacteria migration, and beyond that is still an unexplored territory where
we might also need to take into account hydrodynamic interactions between
bacteria. Another direction worth investigating is for chemotaxis in natural
complex geometries such as the fractal spaces of natural soils [57]. Recent
experimental studies using “transparent soils” have shown that bacterial
motility changes drastically in porous environment [58, 59], and the field-
theoretic Patlak-Keller-Segel formulation breaks down [60]. The effect of
growth becomes important, thus instead of a trajectory-based method of
quantifying entropy production as in here [26], it is better to utilize a
model-free approach [25]. For a bigger picture in a general dynamic
environment, entropy serves as a conduit of information, allowing us to
establish a measure of how the chemotactic population assimilates knowledge
about its chemical surroundings. Moreover, considering entropy production
enables us to pinpoint the specific locations where the intriguing collective
behaviors, akin to the “nucleation” phenomena, originate [25, 26]. Our small
and simple exploration in this brief report has only offered a tantalizing
glimpse into the coupling between biological systems and their environment,
paving the way for further investigation and a deeper understanding of these
complex phenomena from the first principles.

##  VII Acknowledgement

We thanks Robert H. Austin for the encouragement of publishing this work. We
thanks Stefano Martiniani and Satyam Anand for the many discussions about how
bacterial entropy production rate can be estimated.

##  Appendix A Constructing the Fokker-Planck Equations

Here we explain how the PDEs in Eq. (5) are constructed. We start by noting
that each chemotactic agent is specified by their position $z$ and their
gained internal state $f$. The change in these values depends on their
instantaneous velocity $v_{i}$ as follows:

$\frac{d}{dt}z\Big{|}_{i}=v_{i}\ \ ,\ \
\frac{d}{dt}f\Big{|}_{i}=\frac{f_{0}-f}{t_{\text{M}}}+\frac{NHv_{i}}{L}\ \ .$
(30)

The later comes from Eq. (1) and Eq. (3), using the definition $f(t)=HF(t)$.
We use the label $i$ to denote the available motility states
$\left\\{\text{R}-,\text{T}-,\text{T}+,\text{R}+\right\\}$, then the drift
terms for the probability $P_{i}(t,z,f)$ PDE is given by:

$\partial_{t}P_{i}(t,z,f)=-\partial_{z}\left[\frac{d}{dt}z\Big{|}_{i}P_{i}(t,z,f)\right]-\partial_{f}\left[\frac{d}{dt}f\Big{|}_{i}P_{i}(t,z,f)\right]+\left(...\right)\
\ .$ (31)

For example, let us consider $i=\text{R}+$, thus $v_{i}=+v_{0}$. Then Eq. (31)
becomes:

$\partial_{t}P_{\text{R}+}(t,z,f)=-\partial_{z}\left[v_{0}P_{\text{R}+}(t,z,f)\right]-\partial_{f}\left[\left(\frac{f_{0}-f}{t_{\text{M}}}+\frac{NHv_{0}}{L}\right)P_{\text{R}+}(t,z,f)\right]+\left(...\right)\
\ .$ (32)

Do this for all other states, we can arrive at Eq. (5). The rest of the terms,
which we refer to as $(...)$ in Eq. (31), are transition rates, as pictured in
Fig. 1.

##  Appendix B Probabilistic Considerations in One-Dimensional Space

###  B.1 General Gradient $1/L$

Let us look at the two ODEs as described in Eq. (7), in details:

$\begin{split}0\ &=\
\partial_{f}\left\\{\left[\left(f_{0}-f\right)-\frac{r(f)}{\tau_{L}}\right]P_{-}\left(f\right)\right\\}+\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\left[P_{-}(f)-P_{+}(f)\right]\
\ ,\\\ 0\ &=\
\partial_{f}\left\\{\left[\left(f_{0}-f\right)+\frac{r(f)}{\tau_{L}}\right]P_{+}\left(f\right)\right\\}+\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\left[P_{+}(f)-P_{-}(f)\right]\
\ .\end{split}$ (33)

By adding and subtracting these, we have an equivalent system:

$\begin{split}0\ &=\
\partial_{f}\left\\{\left(f_{0}-f\right)\left[P_{-}\left(f\right)+P_{+}\left(f\right)\right]+\frac{r(f)}{\tau_{L}}\left[-P_{-}\left(f\right)+P_{+}\left(f\right)\right]\right\\}\
\ ,\\\ 0\ &=\
\partial_{f}\left\\{-\left(f_{0}-f\right)\left[-P_{-}\left(f\right)+P_{+}\left(f\right)\right]-\frac{r(f)}{\tau_{L}}\left[P_{-}\left(f\right)+P_{+}\left(f\right)\right]\right\\}\\\
&-2\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\left[-P_{-}(f)+P_{+}(f)\right]\
\ .\end{split}$ (34)

Define the sum $\mathbb{A}(f)=P_{-}(f)+P_{+}(f)$ and difference
$\mathbb{S}(f)=-P_{-}(f)+P_{+}(f)$, which together can be used to obtain the
probability density:

$P_{\mp}(f)=\left[\mathbb{A}(f)\mp\mathbb{S}(f)\right]/2\ \ ,$ (35)

then we get:

$\begin{split}0\ &=\
\partial_{f}\left[-\left(f-f_{0}\right)\mathbb{A}(f)+\frac{r(f)}{\tau_{L}}\mathbb{S}(f)\right]\
\ ,\\\ 0\ &=\
\partial_{f}\left\\{(f-f_{0})\mathbb{S}(f)-\frac{r(f)}{\tau_{L}}\mathbb{A}(f)\right\\}-2\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\mathbb{S}(f)\
\ .\end{split}$ (36)

From the first equation we have the relationship:

$\mathbb{A}(f)=\left[\frac{r(f)}{\tau_{L}}\left(f-f_{0}\right)^{-1}\right]\mathbb{S}(f)\
.$ (37)

This can then be used in the second equation to arrive at:

$0\ =\
\partial_{f}\left[\Xi^{-1}(f)\mathbb{S}(f)\right]+2\left[\frac{1-r(f)}{\tau_{\text{F}}}\right]\mathbb{S}(f)\
.$ (38)

where the function $\Xi(f)$ is given by:

$\Xi(f)=\frac{\displaystyle(f-f_{0})}{\displaystyle\left[\frac{r(f)}{\tau_{L}}\right]^{2}-(f-f_{0})^{2}}\
.$ (39)

We can now solve Eq. (38) analytically, with an integration $\Psi(f)$ and a
constant $\mathbb{C}$ yet to be determined:

$\mathbb{S}(f)=\Xi(f)\exp\left[-\Psi(f)\right]\times\mathbb{C}\ \ ,\ \
\begin{dcases}&\Psi(f)\Big{|}_{f<f_{0}}=+\int^{f_{0}}_{f}df^{\prime}\left\\{\frac{2\left[1-r(f^{\prime})\right]}{\tau_{\text{F}}}\right\\}\Xi(f^{\prime})\\\\[10.0pt]
&\Psi(f)\Big{|}_{f=f_{0}}=0\\\\[10.0pt]
&\Psi(f)\Big{|}_{f>f_{0}}=-\int^{f}_{f_{0}}df^{\prime}\left\\{\frac{2\left[1-r(f^{\prime})\right]}{\tau_{\text{F}}}\right\\}\Xi(f^{\prime})\end{dcases}\
.$ (40)

To determine $\mathbb{C}$, we make sure that the integral of $\mathbb{A}$ over
all space is unity:

$\begin{split}\int_{f_{-}}^{f_{+}}df^{\prime}\mathbb{A}(f^{\prime})&=\int_{f_{-}}^{f_{+}}df^{\prime}\left[\dfrac{r(f^{\prime})}{\tau_{L}}(f^{\prime}-f_{0})^{-1}\right]\Xi(f^{\prime})\exp\left[-\Psi(f^{\prime})\right]\times\mathbb{C}=1\\\
\Longrightarrow\mathbb{C}&=\left(\int_{f_{-}}^{f_{+}}df^{\prime}\left\\{\frac{\displaystyle\left[\frac{r(f^{\prime})}{\tau_{L}}\right]}{\displaystyle\left[\frac{r(f^{\prime})}{\tau_{L}}\right]^{2}-(f^{\prime}-f_{0})^{2}}\right\\}\exp\left[-\Psi(f^{\prime})\right]\right)^{-1}\
\ .\end{split}$ (41)

Substitute into Eq. (35) with our findings for $\mathbb{S}(f)$ as in Eq. (40)
and $\mathbb{A}(f)$ as in Eq. (37), we get the probability distribution:

$P_{\mp}(f)=\left\\{\left[\frac{r(f)}{\tau_{L}}\right]\pm\left(f-f_{0}\right)\right\\}^{-1}\exp\left[-\Psi(f)\right]\
\times\ \frac{\mathbb{C}}{2}\ \ ,$ (42)

which is the same as Eq. (10).

###  B.2 Weak Gradient $1/L\rightarrow 0$

Define the coefficients:

$\alpha_{L}=\frac{r(f_{0})}{\tau_{L}}\ \ ,\ \
\alpha_{\text{F}}=\frac{2\left[1-r(f_{0})\right]}{\tau_{\text{F}}}\ .$ (43)

We can proceed further analytically by considering the weak-gradient limit
$\tau_{L}\rightarrow\infty$ (as the characteristic length scale become
extremely large $L\rightarrow\infty$), corresponding to $\alpha_{L}\rightarrow
0$. The available range as in Eq. (8) can be approximated as:

$f_{\mp}=f_{0}\mp\frac{r(f_{\mp})}{\tau_{L}}\approx
f_{0}\mp\frac{r(f_{0})}{\tau_{L}}=f_{0}\mp\alpha_{L}\ ,$ (44)

where for the final manipulation we use
$\displaystyle\frac{d}{df^{\prime}}r(f^{\prime})\Big{|}_{f^{\prime}=f_{0}}=r(f_{0})\left[1-r(f_{0})\right]$
that follows from the functional form given in Eq. (1). Consider
$\tau_{\text{F}}\ll 1$ which leads to $\alpha_{\text{F}}\gg 1$, then
$P_{\mp}(f)$ is approximately a Gaussian function that dominates inside an
even smaller region $|f-f_{0}|\sim\alpha_{\text{F}}^{-1/2}\alpha_{L}$ compared
to the range $f\in[f_{-},f_{+}]$ where $-f_{-}+f_{+}\approx 2\alpha_{L}$. We
can then estimate $\Psi(f)$ from Eq. (40) as:

$\Psi(f)\approx\frac{1}{2}\alpha_{\text{F}}\alpha_{L}^{-2}(f-f_{0})^{2}+\varphi_{3}(f-f_{0})^{3}+\varphi_{4}(f-f_{0})^{4}+...$
(45)

where

$\varphi_{3}=\dfrac{1}{3}\alpha_{\text{F}}\alpha_{L}^{-2}[r(f_{0})-2]\ \ ,\ \
\varphi_{4}=\dfrac{1}{8}\alpha_{\text{F}}\alpha_{L}^{-2}[2\alpha_{L}^{-2}+4-3r(f_{0})]\
\ .$ (46)

Given that:

$\begin{split}&\left\\{\frac{\displaystyle\left[\frac{r(f^{\prime})}{\tau_{L}}\right]}{\displaystyle\left[\frac{r(f^{\prime})}{\tau_{L}}\right]^{2}-(f^{\prime}-f_{0})^{2}}\right\\}\approx\\\
&\ \ \ \ \ \ \ \ \ \ \ \
\alpha_{L}^{-1}\left[1+C_{1}(f-f_{0})+C_{2}(f-f_{0})^{2}+3C_{1}C_{2}(f-f_{0})^{3}+...\right]\
\ ,\ \ \end{split}$ (47)

in which the coefficients are:

$C_{1}=r(f_{0})-1\ \ ,\ \ C_{2}=\alpha_{L}^{-2}\ \ ,$ (48)

we can now estimate the value $\mathbb{C}$ in Eq. (41), using the
approximations Eq. (45) and Eq. (47) to obtain a simple expression:

$\begin{split}\mathbb{C}&=\Big{\\{}\alpha_{L}^{-1}\int_{-\infty}^{+\infty}\exp{\left[-\frac{1}{2}\alpha_{\text{F}}\alpha_{L}^{-2}(f-f_{0})^{2}\right]}\times\\\
&\ \ \ \ \ \ \
\left[1+C_{2}(f-f_{0})^{2}-(\varphi_{4}+\varphi_{3}C_{1})(f-f_{0})^{4}\right]\Big{\\}}^{-1}\\\
&\approx\left\\{\sqrt{\dfrac{2\pi}{\alpha_{\text{F}}}}(1+\alpha_{L}^{2}\alpha_{\text{F}}^{-1}C_{2}-3\alpha_{L}^{4}\alpha_{\text{F}}^{-2}(C_{1}\varphi_{3}+\varphi_{4})\right\\}^{-1}\approx\sqrt{\dfrac{\alpha_{\text{F}}}{2\pi}}\dfrac{4\alpha_{\text{F}}}{4\alpha_{\text{F}}+1}\
.\end{split}$ (49)

We also have the following expansion:

$\begin{split}&r(f)\left\\{\left[\frac{r(f)}{\tau_{L}}\right]\pm\left(f-f_{0}\right)\right\\}^{-1}\approx\\\
&\ \ \ \ r(f_{0})\alpha_{L}^{-1}\left[1\mp
A_{1}(f-f_{0})+A_{2}(f-f_{0})^{2}\mp
A_{3}(f-f_{0})^{3}+A_{4}(f-f_{0})^{4}...\right]\ ,\end{split}$ (50)

where

$\begin{split}&A_{1}=\alpha_{L}^{-1}\\\
&A_{2}=\alpha_{L}^{-1}\\{\alpha_{L}^{-1}\pm[1-r(f_{0})]\\}\\\
&A_{3}=\alpha_{L}^{-1}\left\\{\alpha_{L}^{-2}+(\frac{1}{2}\pm
2\alpha_{L}^{-1})[1-r(f_{0})]\right\\}\\\
&A_{4}=\alpha_{L}^{-1}\left[\alpha_{L}^{-3}\pm 3\alpha_{L}^{-2}+(2\mp
3\tau_{L})\alpha_{L}^{-1}+(\tau_{L}^{2}\mp\dfrac{\tau_{L}}{6})\alpha_{L}-3\tau_{L}\pm\frac{1}{6}\right]\
\ .\end{split}$ (51)

Together with Eq. (45) and Eq. (49), we obtain the backward and forward
swimming probabilities:

$\begin{split}\mathcal{P}_{\mp}&=\int^{f_{+}}_{f_{-}}dfr(f)P_{\mp}(f)\\\
&\approx\frac{1}{2}\mathbb{C}r(f_{0})\alpha_{L}^{-1}\int^{+\infty}_{-\infty}df\exp\left[-\frac{1}{2}\alpha_{\text{F}}\alpha_{L}^{-2}(f-f_{0})^{2}\right]\
\times\ \\\ &\ \ \ \ \ \ \ \ \ \ \
\left[1+A_{2}(f-f_{0})^{2}+(A_{4}-\varphi_{4}\pm
A_{1}\varphi_{3})(f-f_{0})^{4}\right]\\\
\color[rgb]{0,0,1}&=\dfrac{\mathbb{C}\sqrt{2\pi}}{2\alpha_{\text{F}}^{5/2}}r(f_{0})\left[\alpha_{\text{F}}^{2}+A_{2}\alpha_{\text{F}}\alpha_{L}^{2}+3\alpha_{L}^{4}(A4\pm
A_{1}\varphi_{3}-\varphi_{4})\right]\\\
&\approx\frac{1}{2}r(f_{0})\left(1\mp\alpha_{\text{F}}^{-1}\alpha_{L}\dfrac{1-\dfrac{9}{\alpha_{\text{F}}}}{1+\dfrac{1}{4\alpha_{\text{F}}}}\right)\approx\frac{1}{2}r(f_{0})\left[1\mp\alpha_{\text{F}}^{-1}\alpha_{L}\right]\
.\end{split}$ (52)

From this we can calculate the average drift speed of this chemotactic
population:

$\langle v\rangle=v_{0}(\mathcal{P}_{+}-\mathcal{P_{-}})\approx
v_{0}r(f_{0})\dfrac{\alpha_{L}}{\alpha_{\text{F}}}\ ,$ (53)

and the time-irreversibility metric:

$\sigma=\mathcal{P}_{+}\ln\left(\dfrac{\mathcal{P}_{+}}{\mathcal{P}_{-}}\right)+\mathcal{P}_{-}\ln\left(\dfrac{\mathcal{P}_{-}}{\mathcal{P}_{+}}\right)=(\mathcal{P}_{+}-\mathcal{P}_{-})\ln\left(\dfrac{\mathcal{P}_{+}}{\mathcal{P}_{-}}\right)\approx
2r(f_{0})\left(\dfrac{\alpha_{L}}{\alpha_{\text{F}}}\right)^{2}\ .$ (54)

##  Appendix C From Micro to Macro

The standard macro-description for chemotactic population is given by the
Patlak-Keller-Segel model, where the density field of agents $n(x,t)$ follows
a partial differential equation (PDE) consisting of a diffusion term
$\propto\mu$, a chemotactic term $\propto\chi$ and a logistic growth term
$\propto\alpha$ with carrying capacity $n_{c}$ [61]:

$\partial_{t}n(\vec{x},t)=\nabla^{2}\left[\mu
n(\vec{x},t)\right]+\nabla\left\\{\chi
n(\vec{x},t)\nabla\Phi\left[C(\vec{x},t)\right]\right\\}+\alpha\left(1-\frac{n(\vec{x},t)}{n_{c}}\right)n(\vec{x},t)\
.$ (55)

Given the timescale of bacteria collective dynamics, the growth term is
usually negligible compard to the other terms [15, 16, 33]. In the weak-
gradient limit $\left|\nabla\Phi\right|=1/L\rightarrow 0$, it is possible to
express the diffusivity $\mu$ and the chemotactic coefficient $\chi$ with the
micro parameters of adaptive run-and-tumble.

###  C.1 One-Dimensional Space

The average drift-speed of the population as follows from Eq. (55) is $\langle
v\rangle=\chi\nabla\Phi=\chi/L$, and we can match it with the results from Eq.
(53) to obtain the chemotactic coefficient as:

$\chi=v_{0}r(f_{0})\frac{\alpha_{L}}{\alpha_{\text{F}}}L=\left\\{NH\frac{r^{2}(f_{0})}{2\left[1-r(f_{0})\right]}\right\\}\frac{v_{0}^{2}}{\lambda_{\text{F}}}\
,$ (56)

in which to arrive at the final answer we have used Eq. (43).

For the diffusivity $\mu$ in the weak-gradient limit, we can estimate that
value by considering the diffusion of a homogeneous population with the same
natural internal state $f=f_{0}$. We follow the approach outlined in [62],
where we treat running and tumbling as two simultaneous, independent Poisson
processes. Specifically, during running, there is no change in direction.
However, tumbling, which occurs at the fraction $\left[1-r(f_{0})\right]$ of
the total time, can lead to a switch in the direction of movement at a rate of
$\lambda_{\text{F}}$. Thus, the correlation timescale $\tau_{\text{cor}}$ is
given by:

$\tau_{\text{cor}}=\left\\{2\left[1-r(f_{0})\right]\lambda_{\text{F}}\right\\}^{-1}\
\ .$ (57)

Use the average swimming speed $v_{\text{avg}}=v_{0}r(f_{0})$, in one-
dimensional space we obtain:

$\mu\approx
v_{\text{avg}}^{2}\tau_{\text{cor}}=\left\\{\frac{r^{2}(f_{0})}{2\left[1-r(f_{0})\right]}\right\\}\frac{v_{0}^{2}}{\lambda_{\text{F}}}\
\ .$ (58)

###  C.2 Physical Three-Dimensional Space

Similar to Eq. (53), in the three-dimensional space, the drift-velocity is
given by:

$\left|\langle\vec{v}\rangle\right|=v_{0}\int^{\pi}_{0}\sin\theta
d\theta\mathcal{P}(\theta)\cos\theta\approx
v_{0}\left\\{\frac{r(f_{0})\left[1+r(f_{0})\right]}{6\pi}\right\\}\frac{\alpha_{L}}{\alpha_{\text{D}}}\
\ .$ (59)

We match this with the populational average drift-speed as follows from Eq.
(55), which is $\left|\langle\vec{v}\rangle\right|=\chi\nabla\Phi=\chi/L$, to
obtain the chemotactic coefficient as
$\chi=\left|\langle\vec{v}\rangle\right|L$:

$\chi=v_{0}\left\\{\frac{r(f_{0})\left[1+r(f_{0})\right]}{6\pi}\right\\}\frac{\alpha_{L}}{\alpha_{\text{D}}}L=\left\\{NH\frac{r^{2}(f_{0})\left[1+r(f_{0})\right]}{12\sqrt{3}\pi\left[1-r(f_{0})\right]}\right\\}\frac{v_{0}^{2}}{D_{T}}$
(60)

In the weak-gradient limit, to estimate the diffusivity $\mu$, we consider a
homogeneous population of approximately identical internal state $f=f_{0}$.
For $D_{\text{T}}\gg D_{\text{R}}$, meaning the rotational diffusivity in
tumbling is much larger than that in running, we can directly utilize the
result from [56]:

$\mu\approx\left\\{\frac{r(f_{0})}{6\left[1-r(f_{0})\right]}\right\\}\frac{v_{0}^{2}}{D_{\text{T}}}\
\ .$ (61)

## References

  * Schweitzer and Farmer [2003] F. Schweitzer and J. D. Farmer,  _Brownian agents and active particles: collective dynamics in the natural and social sciences_ , Vol. 1 (Springer, 2003).
  * Ramaswamy [2010] S. Ramaswamy, Annu. Rev. Condens. Matter Phys. 1, 323 (2010).
  * Marchetti  _et al._ [2013] M. C. Marchetti, J.-F. Joanny, S. Ramaswamy, T. B. Liverpool, J. Prost, M. Rao, and R. A. Simha, Reviews of modern physics 85, 1143 (2013).
  * Hallatschek  _et al._ [2023] O. Hallatschek, S. S. Datta, K. Drescher, J. Dunkel, J. Elgeti, B. Waclaw, and N. S. Wingreen, Nature Reviews Physics , 1 (2023).
  * Onsager [1949] L. Onsager, Annals of the New York Academy of Sciences 51, 627 (1949).
  * Walther and Müller [2008] A. Walther and A. H. Müller, Soft matter 4, 663 (2008).
  * Savoie  _et al._ [2019] W. Savoie, T. A. Berrueta, Z. Jackson, A. Pervan, R. Warkentin, S. Li, T. D. Murphey, K. Wiesenfeld, and D. I. Goldman, Science Robotics 4, eaax4316 (2019).
  * Wang  _et al._ [2021] G. Wang, T. V. Phan, S. Li, M. Wombacher, J. Qu, Y. Peng, G. Chen, D. I. Goldman, S. A. Levin, R. H. Austin, _et al._ , Physical review letters 126, 108002 (2021).
  * Wang  _et al._ [2022] G. Wang, T. V. Phan, S. Li, J. Wang, Y. Peng, G. Chen, J. Qu, D. I. Goldman, S. A. Levin, K. Pienta, _et al._ , Proceedings of the National Academy of Sciences 119, e2120019119 (2022).
  * Miskin  _et al._ [2020] M. Z. Miskin, A. J. Cortese, K. Dorsey, E. P. Esposito, M. F. Reynolds, Q. Liu, M. Cao, D. A. Muller, P. L. McEuen, and I. Cohen, Nature 584, 557 (2020).
  * Keller and Segel [1971] E. F. Keller and L. A. Segel, Journal of theoretical biology 30, 225 (1971).
  * Roussos  _et al._ [2011] E. T. Roussos, J. S. Condeelis, and A. Patsialou, Nature Reviews Cancer 11, 573 (2011).
  * Mori and Ohshima [1995] I. Mori and Y. Ohshima, Nature 376, 344 (1995).
  * Ozkan-Aydin  _et al._ [2021] Y. Ozkan-Aydin, D. I. Goldman, and M. S. Bhamla, Proceedings of the National Academy of Sciences 118, e2010542118 (2021).
  * Morris  _et al._ [2017] R. J. Morris, T. V. Phan, M. Black, K.-C. Lin, I. G. Kevrekidis, J. A. Bos, and R. H. Austin, New Journal of Physics 19, 035002 (2017).
  * Phan  _et al._ [2020] T. V. Phan, R. Morris, M. E. Black, T. K. Do, K.-C. Lin, K. Nagy, J. C. Sturm, J. Bos, and R. H. Austin, Physical Review X 10, 031017 (2020).
  * Santiago [2018] I. Santiago, Nano Today 19, 11 (2018).
  * Ghosh  _et al._ [2020] A. Ghosh, W. Xu, N. Gupta, and D. H. Gracias, Nano Today 31, 100836 (2020).
  * Ornes [2017] S. Ornes, Proceedings of the National Academy of Sciences 114, 12356 (2017).
  * Bunea and Glückstad [2019] A.-I. Bunea and J. Glückstad, Laser & Photonics Reviews 13, 1800227 (2019).
  * Needleman and Dogic [2017] D. Needleman and Z. Dogic, Nature reviews materials 2, 1 (2017).
  * Fruchart  _et al._ [2023] M. Fruchart, C. Scheibner, and V. Vitelli, Annual Review of Condensed Matter Physics 14, 471 (2023).
  * Di Leonardo  _et al._ [2010] R. Di Leonardo, L. Angelani, D. Dell’Arciprete, G. Ruocco, V. Iebba, S. Schippa, M. P. Conte, F. Mecarini, F. De Angelis, and E. Di Fabrizio, Proceedings of the National Academy of Sciences 107, 9541 (2010).
  * Vizsnyiczai  _et al._ [2017] G. Vizsnyiczai, G. Frangipane, C. Maggi, F. Saglimbeni, S. Bianchi, and R. Di Leonardo, Nature communications 8, 15974 (2017).
  * Ro  _et al._ [2022] S. Ro, B. Guo, A. Shih, T. V. Phan, R. H. Austin, D. Levine, P. M. Chaikin, and S. Martiniani, Physical review letters 129, 220601 (2022).
  * Anand  _et al._ [2023] S. Anand, X. Ma, S. Guo, S. Martiniani, and X. Cheng, arXiv preprint arXiv:2308.08421 (2023).
  * Fruchart  _et al._ [2021] M. Fruchart, R. Hanai, P. B. Littlewood, and V. Vitelli, Nature 592, 363 (2021).
  * Argun  _et al._ [2021] A. Argun, A. Callegari, and G. Volpe,  _Simulation of Complex Systems_ (IOP Publishing, 2021).
  * Kuorikoski [2013] J. Kuorikoski, in  _Models, simulations, and representations_ (Routledge, 2013) pp. 186–205.
  * Berg [1975] H. C. Berg, Annual review of biophysics and bioengineering 4, 119 (1975).
  * Erban and Othmer [2004] R. Erban and H. G. Othmer, SIAM Journal on Applied Mathematics 65, 361 (2004).
  * Mattingly  _et al._ [2021] H. Mattingly, K. Kamino, B. Machta, and T. Emonet, Nature physics 17, 1426 (2021).
  * Phan  _et al._ [2023] T. V. Phan, H. H. Mattingly, L. Vo, J. S. Marvin, L. L. Looger, and T. Emonet, bioRxiv , 2023 (2023).
  * Županović  _et al._ [2010] P. Županović, M. Brumen, M. Jagodič, and D. Juretić, Philosophical Transactions of the Royal Society B: Biological Sciences 365, 1397 (2010).
  * Long  _et al._ [2017] J. Long, S. W. Zucker, and T. Emonet, PLoS computational biology 13, e1005429 (2017).
  * Frankel  _et al._ [2014] N. W. Frankel, W. Pontius, Y. S. Dufour, J. Long, L. Hernandez-Nunez, and T. Emonet, Elife 3, e03526 (2014).
  * Tu [2013] Y. Tu, Annual review of biophysics 42, 337 (2013).
  * Fu  _et al._ [2018] X. Fu, S. Kato, J. Long, H. H. Mattingly, C. He, D. C. Vural, S. W. Zucker, and T. Emonet, Nature communications 9, 2177 (2018).
  * Mattingly and Emonet [2022] H. H. Mattingly and T. Emonet, Proceedings of the National Academy of Sciences 119, e2117377119 (2022).
  * Keegstra  _et al._ [2022] J. M. Keegstra, F. Carrara, and R. Stocker, Nature Reviews Microbiology 20, 491 (2022).
  * Brenner  _et al._ [1998] M. P. Brenner, L. S. Levitov, and E. O. Budrene, Biophysical journal 74, 1677 (1998).
  * Setayeshgar  _et al._ [2005] S. Setayeshgar, C. W. Gear, H. G. Othmer, and I. G. Kevrekidis, Multiscale Modeling & Simulation 4, 307 (2005).
  * Lee  _et al._ [2023] S. Lee, Y. M. Psarellis, C. I. Siettos, and I. G. Kevrekidis, Journal of Mathematical Biology 87, 15 (2023).
  * Dufour  _et al._ [2014] Y. S. Dufour, X. Fu, L. Hernandez-Nunez, and T. Emonet, PLoS computational biology 10, e1003694 (2014).
  * Shimizu  _et al._ [2010] T. S. Shimizu, Y. Tu, and H. C. Berg, Molecular systems biology 6, 382 (2010).
  * Parrondo  _et al._ [2009] J. M. Parrondo, C. Van den Broeck, and R. Kawai, New Journal of Physics 11, 073008 (2009).
  * Roldán [2014] É. Roldán,  _Irreversibility and dissipation in microscopic systems_ (Springer, 2014).
  * Roldán and Parrondo [2010] É. Roldán and J. M. Parrondo, Physical review letters 105, 150607 (2010).
  * Roldán and Parrondo [2012] É. Roldán and J. M. Parrondo, Physical Review E 85, 031129 (2012).
  * Gomez-Marin  _et al._ [2008] A. Gomez-Marin, J. Parrondo, and C. Van den Broeck, Europhysics Letters 82, 50002 (2008).
  * Kawai  _et al._ [2007] R. Kawai, J. M. Parrondo, and C. Van den Broeck, Physical review letters 98, 080602 (2007).
  * Roldán  _et al._ [2021] É. Roldán, J. Barral, P. Martin, J. M. Parrondo, and F. Jülicher, New Journal of Physics 23, 083013 (2021).
  * Tan  _et al._ [2021] T. H. Tan, G. A. Watson, Y.-C. Chao, J. Li, T. R. Gingrich, J. M. Horowitz, and N. Fakhri, arXiv preprint arXiv:2107.05701 (2021).
  * Landau [1937] L. D. Landau, Zh. Eksp. Teor. Fiz. 11, 19 (1937).
  * Landau [1944] L. D. Landau, in  _Dokl. Akad. Nauk USSR_ , Vol. 44 (1944) p. 311.
  * Saragosti  _et al._ [2012] J. Saragosti, P. Silberzan, and A. Buguin, PloS one 7, e35412 (2012).
  * Giménez  _et al._ [1997] D. Giménez, R. Allmaras, E. Nater, and D. Huggins, Geoderma 77, 19 (1997).
  * Bhattacharjee and Datta [2019] T. Bhattacharjee and S. S. Datta, Nature communications 10, 2075 (2019).
  * Bhattacharjee  _et al._ [2021] T. Bhattacharjee, D. B. Amchin, J. A. Ott, F. Kratz, and S. S. Datta, Biophysical Journal 120, 3483 (2021).
  * Martínez-Calvo  _et al._ [2022] A. Martínez-Calvo, T. Bhattacharjee, R. K. Bay, H. N. Luu, A. M. Hancock, N. S. Wingreen, and S. S. Datta, Proceedings of the National Academy of Sciences 119, e2208019119 (2022).
  * Narla  _et al._ [2021] A. V. Narla, J. Cremer, and T. Hwa, Proceedings of the National Academy of Sciences 118, e2105138118 (2021).
  * Lovely and Dahlquist [1975] P. S. Lovely and F. Dahlquist, Journal of theoretical biology 50, 477 (1975).