# Entropy production for diffusion processes across a semipermeable interface

Paul C. Bressloff  Department of Mathematics, Imperial College London, London
SW7 2AZ, UK.

###### Abstract

The emerging field of stochastic thermodynamics extends classical ideas of
entropy, heat and work to non-equilibrium systems. One notable finding is that
the second law of thermodynamics typically only holds after taking appropriate
averages with respect to an ensemble of stochastic trajectories. The resulting
average rate of entropy production then quantifies the degree of departure
from thermodynamic equilibrium. In this paper we investigate how the presence
of a semipermeable interface increases the average entropy production of a
single diffusing particle. Starting from the Gibbs-Shannon entropy for the
particle probability density, we show that a semipermeable interface or
membrane ${\mathcal{S}}$ increases the average rate of entropy production by
an amount that is equal to the product of the flux through the interface and
the logarithm of the ratio of the probability density on either side of the
interface, integrated along ${\mathcal{S}}$. The entropy production rate thus
vanishes at thermodynamic equilibrium, but can be nonzero during the
relaxation to equilibrium, or if there exists a nonzero stationary equilibrium
state (NESS). We illustrate the latter using the example of diffusion with
stochastic resetting on a circle, and show that the average rate of
interfacial entropy production is a nonmonotonic function of the resetting
rate and the permeability. Finally, we give a probabilistic interpretation of
the interfacial entropy production rate using so-called snapping out Brownian
motion. This also allows us to construct a stochastic version of entropy
production.

##  I Introduction

In recent years there has been a rapid growth of interest in stochastic
thermodynamics, which uses tools from the theory of stochastic processes to
extend classical ideas of entropy, heat and work to non-equilibrium systems
Sekimoto10 ; Seifert12 ; Cocconi20 ; Peliti21 . Examples include overdamped
colloidal particles, biopolymers, enzymes, and molecular motors. One
characteristic feature of such systems is that the second law of
thermodynamics typically only holds after taking appropriate averages with
respect to an ensemble of stochastic trajectories or over long time intervals.
The resulting average rate of entropy production then quantifies the degree of
departure from thermodynamic equilibrium. In addition, probabilistic methods
such as Itô stochastic calculus, path integrals and Radon-Nikodym derivatives
have been used to derive a variety of important fluctuation relations from the
stochastic entropy evaluated along individual trajectories Seifert05 ;
Chetrite08 ; Sevick08 ; Jarzynski11 . These fluctuation relations have
subsequently been generalized using martingale theory Chetrite11 ; Pigliotti17
; Neri17 ; Neri19 ; Gal21 ; Roldan24 .

In this paper we consider the following problem: how does the presence of a
semipermeable interface contribute to the average entropy production rate of a
single diffusing particle? Diffusion through semipermeable membranes has a
wide range of applications, including molecular transport through biological
membranes Philips12 ; Nik21 ; Bressloff22 , diffusion magnetic resonance
imaging (dMRI) Tanner78 ; Coy94 ; Grebenkov10 , drug delivery Pontrelli07 ;
Todo13 , reverse osmosis Li10 , and animal dispersal in heterogeneous
landscapes Beyer16 ; Assis19 ; Kenkre21 . At the macroscopic level, the
classical boundary condition for a semipermeable membrane takes the particle
flux across the membrane to be continuous and to be proportional to the
difference in concentrations on either side of the barrier. The constant of
proportionality $\kappa_{0}$ is known as the permeability. The semipermeable
boundary conditions are a particular version of the thermodynamically-derived
Kedem-Katchalsky (KK) equations Kedem58 ; Kedem62 ; Kargol96 ; Aho16 . At the
single-particle level, the resulting diffusion equation can be reinterpreted
as the Fokker-Planck (FP) equation for the particle probability density, which
is supplemented by the interfacial boundary conditions. In particular, suppose
that a semipermeable interface ${\mathcal{S}}$ partitions ${\mathbb{R}}^{d}$
into two complementary domains $\Omega_{\pm}$ with
${\mathbb{R}}^{d}=\Omega_{+}\cup\Omega_{-}\cup{\mathcal{S}}$. If
${\mathcal{J}}(\mathbf{y},t)$ denotes the continuous flux across a point
$\mathbf{y}\in{\mathcal{S}}$ from $\Omega_{-}$ to $\Omega_{+}$, then
${\mathcal{J}}(\mathbf{y},t)=\kappa_{0}\
[p_{(}\mathbf{y}^{-},t)-p(\mathbf{y}^{+},t)]/2$, where $p(\mathbf{y}^{\pm},t)$
are the solutions on
${\mathcal{S}}_{\pm}=\overline{\Omega_{\pm}}\cap{\mathcal{S}}$, where
$\overline{\Omega}$ denotes closure of a set $\Omega$.

Starting from the Gibbs-Shannon entropy for the particle probability density
$p(\mathbf{x},t)$, $\mathbf{x}\in{\mathbb{R}}^{d}$, we show in Sect. II that a
semipermeable interface ${\mathcal{S}}$ increases the average rate of entropy
production at a given time $t$ by an amount ${\mathcal{I}}_{\rm
int}(t)=\int_{{\mathcal{S}}}{\mathcal{J}}(\mathbf{y},t)\ln[p(\mathbf{y}^{-},t)/p(\mathbf{y}^{+},t)]d\mathbf{y}$.
In other words, ${\mathcal{I}}_{\rm int}(t)$ is equal to the product of the
flux through the interface and the logarithm of the ratio of the probability
density on either side of the interface, integrated along ${\mathcal{S}}$. It
immediately follows that the entropy production rate vanishes at thermodynamic
equilibrium, but can be nonzero during the relaxation to equilibrium. We
illustrate the theory by calculating the average rate of entropy production
for one-dimensional (1D) diffusion. In the 1D case, ${\mathcal{S}}$ reduces to
a single point $x=0$, say, so that $\Omega_{-}=(-\infty,0^{-}]$ and
$\Omega_{+}=[0^{+},\infty)$.

In Sect. III we turn to a well-studied mechanism for maintaining a diffusing
particle out of thermodynamic equilibrium, namely, stochastic resetting.
Resetting was originally introduced within the context of a Brownian particle
whose position $\mathbf{X}(t)$ instantaneously resets to a fixed position
$\mathbf{x}_{0}$ at a sequence of times generated from a Poisson process of
constant rate $r$ Evans11a ; Evans11b ; Evans14 . There have subsequently been
a wide range of generalizations at the single particle level, see the review
Evans20  and references therein. One of the signature features of diffusion
processes with resetting is that there typically exists a nonequilibrium
stationary state (NESS) that supports nonzero time-independent fluxes. A
number of recent studies have considered the stochastic thermodynamics of
diffusive systems with resetting Fuchs16 ; Pal17 ; Busiello20 ; Gupta20 ;
Pal21 ; Boyer21 ; Boyer22 . One issue that emerges from these studies is that
sharp resetting to a single point is a unidirectional process that has no
time-reversed equivalent. This means that the average rate of entropy
production calculated using the Gibbs-Shannon entropy cannot be related to the
degree of time-reversal symmetry breaking. This connection can be established
by considering resetting to a random position Mori23  or Brownian motion in an
intermittent harmonic confining potential Alston22 . An additional subtle
feature arises when considering the effects of resetting in the presence of a
semipermeable interface Bressloff22b ; Grebenkov22 ; Bressloff23a . In
particular, it is natural to assume that the interface screens out resetting,
in the sense that a resetting event cannot cross the interface. This means
that a particle on one side of the interface $\partial{\mathcal{M}}$ cannot
reset to a point on the other side. Hence, it is not possible to have a non-
zero stationary flux across the interface, since there is no countervailing
reset current in the opposite direction. We bypass the screening effect in
Sect. III by considering the example of single-particle diffusion on a ring
with both stochastic resetting and a semipermeable interface. We derive an
explicit expression for the resulting NESS and use this to calculate the
various contributions to the average rate of entropy production in the
stationary state, including those associated with resetting as well as those
arising from the semipermeable interface.

Finally, in Sect. IV we present a probabilistic interpretation of
${\mathcal{I}}_{\rm int}$ based on so-called snapping out BM Lejay16 ; Lejay18
; Bressloff22a ; Bressloff23 . The latter generates individual stochastic
trajectories of the dynamics by sewing together successive rounds of partially
reflected BMs that are restricted to either the left or right of the barrier.
Each round is killed (absorbed) at the barrier when its boundary local time
exceeds an exponential random variable parameterized by the permeability
$\kappa_{0}$. (The local time is a Brownian functional that specifies the
contact time between a particle and a given boundary Levy40 ; Ito63 ; Dynkin65
; McKean75 ; Grebenkov06 .) A new round is then immediately started in either
direction with equal probability. It is the random switching after each
killing event that is the source of the entropy production. We also use
snapping out BM to construct a stochastic version of entropy production.
Averaging the latter with respect to the distribution of sample paths recovers
the results based on the Gibbs-Shannon entropy.

##  II Single-particle diffusion across a semipermeable interface

Figure 1: Brownian motion in ${\mathbb{R}}$ with a semipermeable interface at
$x=0$. (The two-dimensional representation is for illustrative purposes.)

###  II.1 Diffusion in ${\mathbb{R}}$

Consider an overdamped Brownian particle diffusing in a 1D domain with a
semipermeable barrier or interface at $x=0$. Suppose that the particle is also
subject to a force $F(x,t)$. Let $p(x,t)$ denote the probability density of
the particle at position $x$ at time $t$. The corresponding FP equation takes
the form

$\frac{\partial p(x,t)}{\partial t}=-\frac{\partial J(x,t)}{\partial x},\quad
x\neq 0,\quad t>0,$ (2.1a) with the probability flux $J(x,t)=-D\frac{\partial
p(x,t)}{\partial x}+\frac{1}{\gamma}F(x,t)p(x,t),$ (2.1b) and the following
pair of boundary conditions at the interface:
$J(0^{\pm},t)={\mathcal{J}}(t):=\frac{\kappa_{0}}{2}[p(0^{-},t)-p(0^{+},t)],$
(2.1c)

where $\kappa_{0}$ is a constant permeability. (The arbitrary factor of $1/2$
on the right-hand side of Eq. (2.1c) is motivated by the corresponding
probabilistic interpretation of snapping out BM, see Sect. IV.) In addition,
$D$ is the diffusivity, $\gamma$ is the friction coefficient, and the two
quantities are related according to the Einstein relation $D\gamma=k_{B}T$.
(In the following we set the Boltzmann constant $k_{B}=1$.) For simplicity, we
take the diffusive medium to be spatially homogeneous. However, the domains
$(-\infty,0^{-}]$ and $[0^{+},\infty)$ could have different diffusivities, for
example. That is, $D=D_{-}$ for $x<0$ and $D=D_{+}$ for $x>0$ with $D_{-}\neq
D_{+}$; the drag coefficients would also differ due to the Einstein relation.
Finally, we assume that the force $F(x,t)$ is continuous at the interface.

In order to evaluate various thermodynamic quantities such as the average
heat, work and entropy, we have to integrate with respect to
$x\in{\mathbb{R}}$. Since the probability density has a discontinuity at
$x=0$, we partition each integral into the two domains $(-\infty,0^{-}]$ and
$[0^{+},\infty)$, and introduce the notation

$\fint dx=\int_{-\infty}^{0}dx+\int_{0}^{\infty}dx.$ (2.2)

Continuity of the flux at $x=0$ means that in most cases there is no
contribution to the integral from the discontinuity. One notable exception
occurs when we evaluate the average rate of entropy production.

In the 1D case we can always write the force as a gradient of a potential,
$F(x,t)=-\partial_{x}V(x,t)$. This means that the average internal energy is

${\mathcal{E}}(t)=\fint dx\,p(x,t)V(x,t),$ (2.3)

and

$\displaystyle\frac{d{\mathcal{E}}}{dt}$ $\displaystyle=\fint
dx\,\left[\frac{\partial p(x,t)}{\partial t}V(x,t)+\frac{\partial
V(x,t)}{\partial t}p(x,t)\right].$ (2.4)

Using Eqs. (2.1a,b) and integration by parts, we have

$\displaystyle\int_{-\infty}^{0}dx\,\frac{\partial p(x,t)}{\partial t}V(x,t)$
$\displaystyle=\int_{-\infty}^{0}dx\,\frac{\partial V(x,t)}{\partial
x}J(x,t)-J(0^{-},t)V(0,t)$ (2.5)

and

$\displaystyle\int_{0}^{\infty}dx\,\frac{\partial p(x,t)}{\partial t}V(x,t)$
$\displaystyle=\int_{0}^{\infty}dx\,\frac{\partial V(x,t)}{\partial
t}J(x,t)+J(0^{+},t)V(0,t).$ (2.6)

Imposing flux continuity at the interface leads to a nonequilibrium version of
the first law of thermodynamics:

$\frac{d{\mathcal{E}}}{dt}=\frac{d{\mathcal{W}}}{dt}-\frac{dQ}{dt},$ (2.7)

where ${\mathcal{W}}(t)$ is the average work done on the particle and $Q(t)$
is the average heat dissipated into the environment with

$\displaystyle\frac{dQ}{dt}$ $\displaystyle=-\fint dx\,\frac{\partial
V(x,t)}{\partial x}J(x,t),$ (2.8)

and

$\displaystyle\frac{d{\mathcal{W}}}{dt}$ $\displaystyle=\fint
dx\,\frac{\partial V(x,t)}{\partial t}p(x,t).$ (2.9)

If the potential is time-independent then we have the further simplification
that there exists a unique equilibrium stationary state given by the
Boltzmann-Gibbs distribution,

$\lim_{t\rightarrow\infty}p(x,t)=\frac{1}{Z}{\rm
e}^{-V(x)/T},\quad\lim_{t\rightarrow\infty}J(x,t)=0.$ (2.10)

Since there are no fluxes at equilibrium, the semipermeable membrane becomes
invisible, that is, it has no effect on the stationary state.

Figure 2: Single-particle diffusion across a closed semipermeable interface in
${\mathbb{R}}$. Plots of the average interfacial entropy production rate as a
function time for (a) various resetting positions $x_{0}$ and fixed
permeability $\kappa_{0}=1$ and (b) various $\kappa_{0}$ for fixed $x_{0}=1$.

###  II.2 Average entropy production

The average system entropy at time $t$ is defined by

$\displaystyle{\mathcal{S}}^{\rm sys}(t):$ $\displaystyle=-\fint dx\,p(x,t)\ln
p(x,t),$ (2.11)

which takes the form of a Gibbs-Shannon entropy. In order to calculate the
average rate of entropy production, we differentiate both sides of Eq. (2.11)
with respect to time $t$:

$\displaystyle{\mathcal{R}}^{\rm sys}(t)$
$\displaystyle:=\frac{d{\mathcal{S}}^{\rm sys}(t)}{dt}=-\fint
dx\,\frac{\partial p(x,t)}{\partial t}[1+\ln p(x,t)].$ (2.12)

Using the FP equation and performing an integration by parts, we have

$\displaystyle{\mathcal{R}}^{\rm sys}(t)=\fint dx\,\frac{\partial
J(x,t)}{\partial x}[1+\ln p(x,t)]$ $\displaystyle=-\fint
dx\,\frac{J(x,t)}{p(x,t)}\frac{\partial p(x,t)}{\partial x}$ (2.13)
$\displaystyle\quad+J(0^{-},t))[1+\ln p(0^{-},t)]-J(0^{+},t))[1+\ln
p(0^{+},t)].$

Using the definitions of the probability fluxes, the integrand can be
rewritten as

$\displaystyle-\frac{1}{p(x,t)}\frac{\partial p(x,t)}{\partial
x}J(x,t)=\frac{J(x,t)^{2}}{Dp(x,t)}-\frac{F(x,t)J(x,t)}{T}.$ (2.14)

In addition, imposing the permeability conditions shows that

$\displaystyle J(0^{-},t))[1+\ln p(0^{-},t)]-J(0^{+},t))[1+\ln p(0^{+},t)]$
$\displaystyle\qquad={\mathcal{J}}(t)\ln[p(0^{-},t)/p(0^{+},t)].$ (2.15)

We thus obtain a generalization of the classical entropy production rate given
by

$\displaystyle{\mathcal{R}}^{\rm tot}(t)$ $\displaystyle:={\mathcal{R}}^{\rm
sys}(t)+{\mathcal{R}}^{\rm env}(t)$ $\displaystyle=\fint
dx\,\frac{J(x,t)^{2}}{Dp(x,t)}+{\mathcal{I}}_{\rm int}(t),$ (2.16)

where

${\mathcal{I}}_{\rm
int}(t)=\frac{\kappa_{0}}{2}[p(0^{-},t)-p(0^{+},t)]\ln\left[\frac{p(0^{-},t)}{p(0^{+},t)}\right]$
(2.17)

is the contribution to the entropy production from the semipermeable membrane,
and

$\displaystyle{\mathcal{R}}^{\rm env}(t):=\frac{1}{T}\frac{dQ}{dt}=\fint
dx\,\frac{F(x,t)J(x,t)}{T}$ (2.18)

is the average environmental entropy production rate due to heat dissipation,
see Eq. (2.8). Since $[p(0^{-},t)-p(0^{+},t)]$ and $\ln[p(0^{-},t)/\ln
p(0^{+},t)]$ have the same sign, it follows that ${\mathcal{I}}_{\rm
int}(t)\geq 0$, and hence the average total entropy production rate satisfies
the second law of thermodynamics in the sense that

${\mathcal{R}}^{\rm sys}(t)+{\mathcal{R}}^{\rm env}(t)\geq 0,\quad t\geq 0.$
(2.19)

The existence of the contribution ${\mathcal{I}}_{\rm int}$ is one of the main
results of our paper. We will give a physical interpretation of this result in
Sect. IV.

###  II.3 Interfacial entropy production for pure diffusion

In the particular case of a time-independent force $F(x)=-V^{\prime}(x)$, the
rate of entropy production vanishes in the limit $t\rightarrow\infty$ since
there are no fluxes at equilibrium. However, ${\mathcal{R}}^{\rm tot}(t)>0$ at
finite times $t$. This result holds even for pure diffusion, where an explicit
solution of Eqs. (2.1) can be obtained. The simplest way to proceed is to
Laplace transform Eqs. (2.1), under the initial condition
$p(x,0)=\delta(x-x_{0})$. For the sake of illustration we take $x_{0}>0$. It
follows that

$\widetilde{p}(x,s):=\int_{0}^{\infty}{\rm e}^{-st}p(x,t)dt=G(x,x_{0};s),$
(2.20)

where $G(x,_{0};s)$ is the Green’s function of the modified Helmholtz equation

$\frac{d^{2}G}{dx^{2}}-sG(x,x_{0};s)=-\delta(x-x_{0}),$ (2.21a) supplemented
by the interfacial conditions
$\displaystyle-D\frac{dG(x,x_{0};s)}{dx}|_{x=0^{-}}=-D\frac{dG(x,x_{0};s)}{dx}|_{x=0^{+}}$
$\displaystyle=\frac{\kappa_{0}}{2}[G(0^{-},x_{0};s)-G(0^{+},x_{0};s)],$
(2.21b) and with $\lim_{x\rightarrow\pm\infty}G(x,x_{0};s)=0$.

Eq. (2.21a) has the general solution

$G(x,x_{0};s)=\frac{{\rm e}^{\sqrt{s/D}|x-x_{0}|}}{2\sqrt{sD}}+A(s){\rm
e}^{\sqrt{s/D}x}+B(s){\rm e}^{-\sqrt{s/D}x},$ (2.22)

with the pair of coefficients $A(s)$ and $B(s)$ determined by the
supplementary conditions. Finally, inverting the resulting solution in Laplace
space gives

$\displaystyle p(x,t)$ (2.23a) $\displaystyle=\frac{1}{2\sqrt{\pi
Dt}}\left[\exp\left(-\frac{(x-x_{0})^{2}}{4Dt}\right)+\exp\left(-\frac{(x+x_{0})^{2}}{4Dt}\right)\right]$
$\displaystyle-\frac{\kappa_{0}}{2D}\exp\left(\frac{\kappa_{0}}{D}(x+x_{0}+\kappa_{0}t)\right)\mbox{erfc}\left(\frac{(x+x_{0}+2\kappa_{0}t}{2\sqrt{Dt}}\right),$
for $x>0$ and $\displaystyle p(x,t)$ (2.23b)
$\displaystyle=\frac{\kappa_{0}}{2D}\exp\left(\frac{\kappa_{0}}{D}(x_{0}-x+\kappa_{0}t)\right)\mbox{erfc}\left(\frac{x_{0}-x+2\kappa_{0}t}{2\sqrt{Dt}}\right)$

for $x<0$. The complementary error function is

$\mbox{erfc}(x):=\frac{2}{\sqrt{\pi}}\int_{x}^{\infty}{\rm e}^{-y^{2}}dy$
(2.24)

In the limit $\kappa_{0}\rightarrow 0$, we see that $p(x,t)\rightarrow 0$ for
$x<0$ and $p(x,t)\rightarrow p_{+}(x,t)$ for $x>0$, with

$\displaystyle p_{+}(x,t)$ (2.25) $\displaystyle=\frac{1}{2\sqrt{\pi
Dt}}\left[\exp\left(-\frac{(x-x_{0})^{2}}{4Dt}\right)+\exp\left(-\frac{(x+x_{0})^{2}}{4Dt}\right)\right].$

This is consistent with the fact that the interface becomes completely
impermeable in the limit $\kappa_{0}\rightarrow 0$ and the particle started to
the right of the interface. We thus recover the solution of the diffusion
equation on the half-line with a totally reflecting boundary at $x=0$. In
order to determine what happens in the limit $\kappa_{0}\rightarrow\infty$, we
use the asymptotic expansion

$\mbox{erfc}(x)\sim\frac{{\rm
e}^{-x^{2}}}{\sqrt{\pi}x}\left[1-\frac{1}{2x^{2}}+\ldots\right].$ (2.26)

We find that the interface becomes completely transparent and $p(x,t)$ is
given by the classical solution of free diffusion in ${\mathbb{R}}$. In Fig. 2
we show sample plots of the interfacial entropy production rate
${\mathcal{I}}_{\rm int}(t)$, see Eq. (2.17), as a function of time $t$ for
various initial positions $x_{0}$ and permeabilities $\kappa_{0}$. As
expected, the effects of the interface at $x=0$ are greater when $x_{0}$ is
closer to the origin. In addition, increasing the permeability $\kappa_{0}$
increases the initial rise of ${\mathcal{I}}_{\rm int}(t)$ but the effects of
the interface decay more quickly.

Figure 3: Single-particle diffusion across a closed semipermeable membrane in
${\mathbb{R}}^{d}$.

###  II.4 Diffusion across a closed semipermeable membrane in
${\mathbb{R}}^{d}$

The expression (2.17) for the average rate of entropy production through a
semipermeable interface generalizes to higher spatial dimensions. Suppose that
${\mathcal{M}}$ denotes a closed bounded domain
${\mathcal{M}}\subset{\mathbb{R}}^{d}$ with a smooth concave boundary
$\partial{\mathcal{M}}$ separating the two open domains ${\mathcal{M}}$ and
its complement ${\mathcal{M}}^{c}={\mathbb{R}}^{d}\backslash{\mathcal{M}}$,
see Fig. 3. The boundary acts as a semipermeable interface with
$\partial{\mathcal{M}}_{+}$ ($\partial{\mathcal{M}}_{-}$) denoting the side
approached from outside (inside) ${\mathcal{M}}$. Let $p(\mathbf{x},t)$ denote
the probability density function of an overdamped Brownian particle subject to
a force field ${\bf F}(\mathbf{x})$. The multi-dimensional analog of the FP
Eq. is

$\displaystyle\frac{\partial p(\mathbf{x},t)}{\partial t}$
$\displaystyle=-{\bm{\nabla}}\cdot{\bf J}(\mathbf{x},t),\
\mathbf{x}\in{\mathcal{M}}\cup{\mathcal{M}}^{c},$ (2.27a) $\displaystyle{\bf
J}(\mathbf{x},t)$
$\displaystyle=-D{\bm{\nabla}}p(\mathbf{x},t)+\frac{1}{\gamma}{\bf
F}(\mathbf{x})p(\mathbf{x},t),$ (2.27b) $\displaystyle{\bf
J}(\mathbf{y}^{\pm},t)\cdot{\bf n}$
$\displaystyle={\mathcal{J}}(\mathbf{y},t),\quad\mathbf{y}\in\partial{\mathcal{M}},$
(2.27c) $\displaystyle{\mathcal{J}}(\mathbf{y},t)$
$\displaystyle=\frac{\kappa_{0}}{2}[p(\mathbf{y}^{-},t)-p(\mathbf{y}^{+},t)],\quad\mathbf{y}\in\partial{\mathcal{M}},$
(2.27d)

where $\mathbf{n}$ is the unit normal directed out of ${\mathcal{M}}$.

The average system entropy at time $t$ is defined by

$\displaystyle{\mathcal{S}}^{\rm sys}(t):$
$\displaystyle=-\int_{{\mathcal{M}}}d\mathbf{x}\,p(\mathbf{x},t)\ln
p(\mathbf{x},t)$
$\displaystyle\quad-\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,p(\mathbf{x},t)\ln
p(\mathbf{x},t).$ (2.28)

Differentiating both sides of Eq. (II.4) with respect to time $t$ gives

$\displaystyle{\mathcal{R}}^{\rm sys}(t)$
$\displaystyle:=\frac{d{\mathcal{S}}^{\rm
sys}(t)}{dt}=-\int_{{\mathcal{M}}}d\mathbf{x}\,\,\frac{\partial
p(\mathbf{x},t)}{\partial t}[1+\ln p(\mathbf{x},t)]$
$\displaystyle\qquad-\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,\frac{\partial
p(\mathbf{x},t)}{\partial t}[1+\ln p(\mathbf{x},t)].$ (2.29)

Using the FP Eq. (2.27) and performing an integration by parts according to
the divergence theorem, we have

$\displaystyle{\mathcal{R}}^{\rm
sys}(t)=\int_{{\mathcal{M}}}d\mathbf{x}\,[1+\ln
p(\mathbf{x},t)]{\bm{\nabla}}\cdot{\bf J}(\mathbf{x},t)$
$\displaystyle\qquad\qquad+\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,[1+\ln
p(\mathbf{x},t)]{\bm{\nabla}}\cdot{\bf J}(\mathbf{x},t)$
$\displaystyle=-\int_{{\mathcal{M}}}d\mathbf{x}\,{\bm{\nabla}}p(\mathbf{x},t)\cdot\frac{{\bf
J}(\mathbf{x},t)}{p(\mathbf{x},t)}-\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,{\bm{\nabla}}p(\mathbf{x},t)\cdot\frac{{\bf
J}(\mathbf{x},t)}{p(\mathbf{x},t)}$
$\displaystyle\qquad+\int_{\partial{\mathcal{M}}_{-}}d\mathbf{y}\,[1+\ln
p(\mathbf{y},t)]{\bf J}(\mathbf{y},t)\cdot\mathbf{n}$
$\displaystyle\qquad-\int_{\partial{\mathcal{M}}_{+}}d\mathbf{y}\,[1+\ln
p(\mathbf{y},t)]{\bf J}(\mathbf{y},t)\cdot\mathbf{n}.$ (2.30)

We now decompose the various contributions to ${\mathcal{R}}^{\rm sys}$ along
analogous lines to the 1D case. This leads to the higher dimensional version
of Eq. (2.16):

$\displaystyle{\mathcal{R}}^{\rm tot}(t):={\mathcal{R}}^{\rm
sys}(t)+{\mathcal{R}}^{\rm env}(t)$
$\displaystyle=\int_{{\mathcal{M}}}d\mathbf{x}\,\frac{{\bf
J}(\mathbf{x},t)^{2}}{Dp(\mathbf{x},t)}+\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,\frac{{\bf
J}(\mathbf{x},t)^{2}}{Dp(\mathbf{x},t)}+{\mathcal{I}}_{\rm int}(t),$ (2.31)

where

${\mathcal{I}}_{\rm
int}(t)=\int_{\partial{\mathcal{M}}}d\mathbf{y}\,{\mathcal{J}}(\mathbf{y},t)\ln\left[\frac{p(\mathbf{y}^{-},t)}{p(\mathbf{y}^{+},t)}\right]$
(2.32)

is the contribution to the entropy production from the semipermeable membrane,
and

$\displaystyle{\mathcal{R}}^{\rm env}(t)=\frac{1}{T}\frac{dQ}{dt}$ (2.33)
$\displaystyle=\int_{{\mathcal{M}}}d\mathbf{x}\,\frac{{\bf
F}(\mathbf{x},t)\cdot{\bf
J}(\mathbf{x},t)}{T}+\int_{{\mathcal{M}}^{c}}d\mathbf{x}\,\frac{{\bf
F}(\mathbf{x},t)\cdot{\bf J}(\mathbf{x},t)}{T}.$

###  II.5 Imperfect contacts and the chemical potential

A classical generalization of the permeable boundary condition (2.1c), or its
higher-dimensional generalization (2.27c), is to include a directional
asymmetry in the permeability, which can be interpreted as a step
discontinuity in a chemical potential Kedem58 ; Kedem62 ; Kargol96 ; Farago20
:

$J(0^{\pm},t)={\mathcal{J}}(t):=\frac{\kappa_{0}}{2}[p(0^{-},t)-\sigma
p(0^{+},t)]$ (2.34)

for $0\leq\sigma\leq 1$. This tends to enhance the concentration to the right
of the interface. (If $\sigma>1$ then we would have an interface with
permeability $\kappa_{0}\sigma$ and bias $1/\sigma$ to the left.) The
derivation of the average entropy production rate for a 1D diffusive process
proceeds along similar lines as the symmetric case, leading to Eq. (2.16).
However, the interfacial contribution (2.17) now takes the form

$\displaystyle{\mathcal{I}}_{\rm int}(t)$
$\displaystyle=\frac{\kappa_{0}}{2}[p(0^{-},t)-\sigma
p(0^{+},t)]\ln\left[\frac{p(0^{-},t)}{p(0^{+},t)}\right],$ (2.35)

which is not necessarily positive. In order to obtain the correct second law
of thermodynamics, we decompose ${\mathcal{I}}_{\rm int}(t)$ as

$\displaystyle{\mathcal{I}}_{\rm int}(t)$
$\displaystyle={\mathcal{I}}_{\sigma}(t)+\frac{\kappa_{0}}{2}[p(0^{-},t)-\sigma
p(0^{+},t)]\ln\sigma,$ (2.36)

with

$\displaystyle{\mathcal{I}}_{\sigma}(t)$
$\displaystyle=\frac{\kappa_{0}}{2}[p(0^{-},t)-\sigma
p(0^{+},t)]\ln\left[\frac{p(0^{-},t)}{\sigma p(0^{+},t)}\right]\geq 0.$ (2.37)

Suppose that there is a discontinuity in the chemical potential across the
interface, with $\mu=\mu_{-}$ for $x<0$ and $\mu=\mu_{+}$ for $x>0$. We then
make the identification $\sigma={\rm e}^{(\mu_{+}-\mu_{-})/T}$ with
$\mu_{+}<\mu_{-}$ for $\sigma<1$, such that

${\mathcal{I}}_{\rm
int}(t)={\mathcal{I}}_{\sigma}(t)+{\mathcal{J}}(t)\frac{\mu_{+}-\mu_{-}}{T},$
(2.38)

The second term on the right-hand side represents the rate of reduction in the
free energy due to the probability flux ${\mathcal{J}}(t)$ from a region with
a high chemical potential $\mu_{-}$ to a region with a low chemical potential
$\mu_{+}$. This change in free energy contributes to the heat dissipated into
the environment. Hence, redefining the environmental entropy according to

$\displaystyle{\mathcal{R}}^{\rm env}(t)$ $\displaystyle=\fint
dx\,\frac{F(x,t)J(x,t)}{T}+{\mathcal{J}}(t)\frac{\mu_{-}-\mu_{+}}{T},$ (2.39)

we obtain the modified second law of thermodynamics

$\displaystyle{\mathcal{R}}^{\rm tot}(t)=\fint
dx\,\frac{J(x,t)^{2}}{Dp(x,t)}+{\mathcal{I}}_{\sigma}(t)\geq 0.$ (2.40)

##  III Stochastic resetting on circle with a semipermeable interface

We now turn to an example that supports an NESS in the large time limit by
combining diffusion across a semipermeable interface with stochastic
resetting. In previous work we considered scenarios similar to the one shown
in Fig. 4(a) Bressloff22b ; Bressloff23a . We assumed that the semipermeable
interface acts as a screen for resetting in the sense that a particle located
in ${\mathcal{M}}$ cannot reset to a point
$\mathbf{x}_{0}\in{\mathcal{M}}^{c}$ and vice versa. This means that although
the NESS is characterized by non-zero stationary fluxes in both domains, the
net flux across the interface is zero. The last result can be understood as
follows. Suppose, for concreteness, that the stationary interfacial flux
${\mathcal{J}}^{*}$ is positive so that there is a net flow of probability
from ${\mathcal{M}}$ to ${\mathcal{M}}^{c}$. The screening effect of the
interface means that there is no reset flux in the opposite direction, which
is impossible for a stationary state with $p^{*}(\mathbf{x})>0$ unless
${\mathcal{J}}^{*}=0$. The vanishing of the interfacial flux can also be
confirmed by explicitly calculating the NESS Bressloff22b ; Bressloff23a .

Figure 4: Screening effect of a semipermeable membrane for a diffusing
particle with resetting. (a) Closed semipermeable membrane
$\partial{\mathcal{M}}$ in ${\mathbb{R}}^{d}$ with a resetting point
$\mathbf{x}_{0}\in{\mathcal{M}}^{c}$. Although the particle can diffuse across
$\partial{\mathcal{M}}$ in either direction, it cannot reset to
$\mathbf{x}_{0}$ whenever it is within ${\mathcal{M}}$. (b) Single particle
diffusing on a circle with a semipermeable interface at $\\{0,+,L^{-}\\}$, and
resetting to a point $x_{0}$. Let $X(t)$ denote the current particle position.
If $X(t)\in[0^{+},x_{0})$ then it can only reset in the anticlockwise
direction, otherwise it can only reset in the clockwise direction.

Therefore, in contrast to our previous work, we consider a Brownian particle
diffusing on a circle of circumference $L$. The circle is topologically
equivalent to a finite interval $[0,L]$ with a semipermeable interface at
$x=\\{0^{+},L^{-}\\}$. The particle is taken to reset at a rate $r$ to a
random position $y\in(0,L)$ generated from the density $\sigma_{0}(y)$. The
presence of the semipermeable interface means that $\sigma_{0}(y)$ does not
have to be a periodic function. In Fig. 4(b) we show the example of resetting
to a single point $x_{0}$, which is obtained by taking
$\sigma_{0}(y)=\delta(y-x_{0})$. Since the particle cannot reset by crossing
the semipermeable interface, it resets in the anticlockwise direction when
$X(t)\in[0^{+},x_{0})$ and resets in the clockwise direction when
$X(t)\in(x_{0},L^{-}]$. For a random reset location, the probability density
$p(x,t)$, $x\in[0,L]$, evolves according to the equation

$\displaystyle\frac{\partial p}{\partial t}$
$\displaystyle=D\frac{\partial^{2}p(x,t)}{\partial
x^{2}}-rp(x,t)+r\sigma_{0}(x),$ (3.1a) together with the interfacial
conditions $\displaystyle-D\frac{\partial p(0^{+},t)}{\partial x}$
$\displaystyle=-D\frac{\partial p(L^{-},t)}{\partial x}={\mathcal{J}}(t),$
(3.1b) $\displaystyle{\mathcal{J}}(t)$
$\displaystyle=\kappa_{0}[p(L^{-},t)-p(0^{+},t)].$ (3.1c)

(A factor of $1/2$ has been absorbed into $\kappa_{0}$.)

###  III.1 Average entropy production

We begin by calculating the average rate of entropy production, and show that
there are contributions from the interface and the resetting protocol, We then
calculate these contributions in the NESS. Substituting Eqs. (3.1a) into the
formula (2.12) for the average rate of entropy production gives

$\displaystyle{\mathcal{R}}^{\rm sys}(t)$
$\displaystyle=\int_{0}^{L}dx\,\frac{\partial J(x,t)}{\partial x}[1+\ln
p(x,t)]+{\mathcal{I}}_{r}(t),$ (3.2)

where $J(x,t)=-D\partial p(x,t)/\partial x$ and

$\displaystyle{\mathcal{I}}_{r}(t)$ $\displaystyle=r\int_{0}^{L}dx\,\
[p(x,t)-\sigma_{0}(x)]\ln p(x,t).$ (3.3)

The integral on the right-hand side of Eq. (3.2) can be analyzed along
identical lines to the case of no resetting. Since there are no forces, we
find that

$\displaystyle{\mathcal{R}}^{\rm sys}(t)$
$\displaystyle=\int_{0}^{L}dx\,\frac{J(x,t)^{2}}{Dp(x,t)}+{\mathcal{I}}_{\rm
int}(t)+r{\mathcal{I}}_{r}(t),$ (3.4)

with

${\mathcal{I}}_{\rm
int}(t)=\kappa_{0}[p(L^{-},t)-p(0^{+},t)]\ln\left[\frac{p(L^{-},t)}{p(0^{+},t)}\right].$
(3.5)

Hence, there are contributions from both the semipermeable interface and
resetting.

In the special case $\sigma_{0}(x)=\delta(x-x_{0})$ (resetting to a fixed
location $x_{0}$), we have

${\mathcal{I}}_{r}(t)=r\int_{0}^{L}dx\,p(x,t)\ln p(x,t)-r\ln p(x_{0},t).$
(3.6)

Following along analogous lines to Ref. Seifert12  we define
${\mathcal{R}}^{\rm reset}(t)=-{\mathcal{I}}_{r}(t)$ and rewrite Eq. (3.4) as

$\displaystyle{\mathcal{R}}^{\rm sys}(t)+{\mathcal{R}}^{\rm
reset}(t)=\int_{0}^{L}dx\,\frac{J(x,t)^{2}}{Dp(x,t)}+{\mathcal{I}}_{\rm
int}(t)\geq 0.$ (3.7)

As highlighted in the introduction, resetting to a single point is a
unidirectional process that has no time-reversed equivalent. This means that
the average rate of entropy production calculated using the Gibbs-Shannon
entropy cannot be related to the degree of time-reversal symmetry breaking. On
the other hand, as shown in Ref. Mori23 , such a connection can be made in the
case of a regular resetting density $\sigma_{0}(x)>0$. The contribution
${\mathcal{I}}_{r}(t)$ is now decomposed as

$\displaystyle{\mathcal{I}}_{r}(t)$
$\displaystyle=K[p(\cdot,t)|\sigma_{0}]+K[\sigma_{0}|p(\cdot,t)]$
$\displaystyle\quad-\int_{0}^{L}dx\,[\sigma_{0}(x)-p(x,t)]\ln\sigma_{0}(x),$
(3.8)

where $K[p|q]$ is the Kullback-Leibler divergence of any two measures $p,q$ on
${\mathbb{R}}$:

$K[p|q]=\int dx\,p(x)\ln[p(x)/q(x)].$ (3.9)

Using Jensen’s inequality for convex functions it is straightforward to prove
that $K[p|q]\geq 0$. Hence, we can rewrite the entropy production equation as

$\displaystyle{\mathcal{R}}^{\rm sys}(t)+{\mathcal{R}}^{\rm res}(t)$
$\displaystyle=\int_{0}^{L}\frac{J(x,t)^{2}}{Dp(x,t)}+{\mathcal{I}}_{\rm
int}(t)+r(K[p(\cdot,t)|\sigma_{0}]+K[\sigma_{0}|p(\cdot,t)])$
$\displaystyle\geq 0,$ (3.10)

where

$\displaystyle{\mathcal{R}}^{\rm res}(t)$
$\displaystyle=r\int_{0}^{L}dx\,[\sigma_{0}(x)-p(x,t)]\ln\sigma_{0}(x).$

###  III.2 Non-equilibrium stationary state (NESS)

In contrast to the system without resetting, there exists a nonequilibrium
stationary state (NESS) for which there are non-zero stationary fluxes
$J^{*}(x)$ and ${\mathcal{J}}^{*}$, both of which contribute to the average
rate of entropy production. Setting all time derivatives to zero in Eqs. (3.1)
gives

$\displaystyle D\frac{d^{2}p^{*}(x)}{dx^{2}}-rp^{*}(x)=-r\sigma_{0}(x),$
(3.11a)
$\displaystyle-D\frac{dp^{*}(0)}{dx}=-D\frac{dp^{*}(L)}{dx}={\mathcal{J}}^{*}=\kappa_{0}[p^{*}(L)-p^{*}(0)].$
(3.11b)

For the moment, suppose that $\sigma_{0}(x)=\delta(x-x_{0})$. The general
solution of Eq. (3.11a) then takes the form

$\displaystyle p^{*}=p_{-}^{*}(x,x_{0})$ $\displaystyle=A_{1}(x_{0}){\rm
e}^{\eta x}+B_{1}(x_{0}){\rm e}^{-\eta x},\quad 0<x<x_{0}$ (3.12a)
$\displaystyle p^{*}=p_{+}^{*}(x,x_{0})$ $\displaystyle=A_{2}(x_{0}){\rm
e}^{\eta x}+B_{2}(x_{0}){\rm e}^{-\eta x},\quad x_{0}<x<L,$ (3.12b)

with $\eta=\sqrt{r/D}$. There are four unknown coefficients and four
supplementary conditions. The first pair arises from the conditions at
$x_{0}$:

$\displaystyle p_{-}^{*}(x_{0},x_{0})=p_{+}^{*}(x_{0},x_{0}),$ (3.13a)
$\displaystyle\left.D\frac{dp_{+}^{*}(x,x_{0})}{dx}\right|_{x=x_{0}}-\left.D\frac{dp_{-}^{*}(x,x_{0})}{dx}\right|_{x=x_{0}}=-r/D,$
(3.13b)

that is

$\displaystyle A_{2}{\rm e}^{\eta x_{0}}+B_{2}{\rm e}^{-\eta x_{0}}=A_{1}{\rm
e}^{\eta x_{0}}+B_{1}{\rm e}^{-\eta x_{0}},$ (3.14a) $\displaystyle A_{2}{\rm
e}^{\eta x_{0}}-B_{2}{\rm e}^{-\eta x_{0}}=A_{1}{\rm e}^{\eta x_{0}}-B_{1}{\rm
e}^{-\eta x_{0}}-\frac{r}{\eta D}.$ (3.14b)

The second pair follow from the interfacial conditions (3.11b):

$\displaystyle A_{2}{\rm e}^{\eta L}-B_{2}{\rm e}^{-\eta L}=A_{1}-B_{1},$
(3.15a) $\displaystyle A_{2}{\rm e}^{\eta L}+B_{2}{\rm e}^{-\eta
L}=\left(1-\frac{D\eta}{\kappa_{0}}\right)A_{1}+\left(1+\frac{D\eta}{\kappa_{0}}\right)B_{1}.$
(3.15b)

After some algebra we find that

$\displaystyle A_{1}$ $\displaystyle=\frac{(a_{-}+b_{-})\Gamma_{-}(x_{0}){\rm
e}^{\eta L}-(a_{-}-b_{-})\Gamma_{+}(x_{0}){\rm e}^{-\eta
L}}{b_{-}a_{+}+b_{+}a_{-}},$ (3.16a) $\displaystyle B_{1}$
$\displaystyle=\frac{(a_{+}-b_{+})\Gamma_{-}(x_{0}){\rm e}^{\eta
L}-(a_{+}+b_{+})\Gamma_{+}(x_{0}){\rm e}^{-\eta L}}{b_{-}a_{+}+b_{+}a_{-}},$
(3.16b) and $A_{2}(x_{0})=A_{1}(x_{0})-\Gamma_{-}(x_{0}),\quad
B_{2}(x_{0})=B_{1}(x_{0})+\Gamma_{+}(x_{0}),$ (3.16c)

where

$\displaystyle a_{\pm}={\rm e}^{\pm\eta L}-1,\quad
b_{\pm}=a_{\pm}\pm\frac{D\eta}{\kappa_{0}},\quad\Gamma_{\pm}(x_{0})=\frac{r}{2\eta
D}{\rm e}^{\pm\eta x_{0}}.$ (3.17)

Figure 5: Single-particle diffusion on a ring with resetting to the same
location $x_{0}$. The ring is mapped to the interval $[0,L]$ with a
semipermeable interface at $x=\\{0^{+},L^{-}\\}$. Plots of the stationary
densities $p^{*}(0^{+})$ (solid curves) and $p^{*}(L^{-})$ (dashed curves) on
either side of the interface as a function of (a) the resetting rate $r$ for
fixed $x_{0}$ and (b) the resetting position $x_{0}$ for fixed $r$. Other
parameter values are $D=\kappa_{0}=L=1$. The thin solid line in (a) is the
stationary density when $x_{0}=0.5$; by symmetry the density is continuous
across the interface. Figure 6: Single-particle diffusion on a ring with
resetting to the same location $x_{0}$. Plots of the average rate of
interfacial entropy production ${\mathcal{I}}_{\rm int}^{*}$ as a function of
(a) the resetting rate $r$ and (b) the resetting location $x_{0}$. Other
parameter values are the same as Fig. 5. Figure 7: Single-particle diffusion
on a ring with resetting to the same location $x_{0}=0.25$. Plots of the
average rate of interfacial entropy production ${\mathcal{I}}_{\rm int}^{*}$
as a function of the permeability $\kappa_{0}$ and different values of $r$.
Other parameter values are the same as Fig. 5.

In Figs. 5(a,b) we plot the solutions $p_{-}^{*}(0,x_{0})$ and
$p_{+}^{*}(L,x_{0})$ on either side of the semipermeable interface as a
function of $r$ and $x_{0}$, respectively. We fix the space and time units by
setting $L=D=1$. A number of observations can be made. First, if $x_{0}=0.5$
then $p_{-}^{*}(0,x_{0})=p_{+}^{*}(L,x_{0})$ for all resetting rates $r\geq
0$. This is a consequence of the symmetry of the configuration under the
reflection $x\rightarrow 1-x$. This symmetry no longer holds when $x_{0}\neq
0.5$ and $r>0$. That is, $p_{-}^{*}(0,x_{0})>p_{+}^{*}(L,x_{0})$ for
$x_{0}\in(0,0.5)$ and there is now an exchange symmetry
$p_{-}^{*}(0,x_{0})\leftrightarrow p_{+}^{*}(L,x_{0})$ under reflection.
Second, for fixed $x_{0}\in(0,L)$, the discontinuity across the interface is a
nonmonotonic function of $r$, since the stationary state is at equilibrium
when $r=0$ and the density at the interface vanishes in the limit
$r\rightarrow\infty$. On the other hand, the discontinuity is a monotonically
decreasing function of $x_{0}\in(0,0.5)$. These results are reflected in plots
of the average entropy production rate at the interface,

${\mathcal{I}}_{\rm
int}^{*}={\mathcal{J}}^{*}(x_{0})\ln[p_{-}^{*}(0,x_{0})/p_{+}^{*}(L,x_{0})],$
(3.18)

with
${\mathcal{J}}^{*}(x_{0})=\kappa_{0}[p_{-}^{*}(0,x_{0})-p_{+}^{*}(L,x_{0})]$,
see Fig. 6. We also find that ${\mathcal{I}}_{\rm int}^{*}$ is a nonmonotonic
function of the permeability $\kappa_{0}$, as illustrated in Fig. 7. This
follows from the fact that ${\mathcal{I}}_{\rm int}^{*}$ vanishes in the
limits $\kappa_{0}\rightarrow 0$ and $\kappa_{0}\rightarrow\infty$. In the
first limit, the circle becomes topologically equivalent to a finite interval
with totally reflecting boundaries at both end, whereas in the second limit
the interface becomes totally transparent.

Figure 8: Single-particle diffusion on a ring with resetting to a random
location that is distributed according to the probability density (3.19)
parameterized by $\xi_{0}$. Plots of the average rate of interfacial entropy
production ${\mathcal{I}}_{\rm int}^{*}$ as a function of $r$ for different
values of $\xi_{0}$. Other parameters are $D=L=1$, $\kappa_{0}=1$ and
$x_{0}=0.25$. Figure 9: Single-particle diffusion on a ring with resetting to
a random location that is distributed according to the probability density
(3.19) parameterized by $\xi_{0}$. Plots of the average rate of resetting
entropy production ${\mathcal{I}}_{r}^{*}$ as a function of (a) $r$ for
different values of $\xi_{0}$ and (b) $\xi_{0}$ for different values of $r$.
Other parameters are $D=L=1$, $\kappa_{0}=1$ and $x_{0}=0.25$.

Let us now turn to a resetting protocol in which the particle resets to a
random point according to the density

$\displaystyle\sigma_{0}(y,x_{0})$ $\displaystyle=\Lambda_{0}(x_{0}){\rm
e}^{-|y-x_{0}|\xi_{0}},$ (3.19a) $\displaystyle\Lambda_{0}(x_{0})$
$\displaystyle=\frac{\xi_{0}}{2-{\rm e}^{-x_{0}\xi_{0}}-{\rm
e}^{-(L-x_{0})\xi_{0}}}.$ (3.19b)

Note that $\sigma_{0}(y,x_{0})\rightarrow\delta(x-x_{0})$ in the limit
$\xi_{0}\rightarrow\infty$ and $\sigma_{0}(y,x_{0})\rightarrow 1/L$ in the
limit $\xi_{0}\rightarrow 0$. The corresponding NESS is

$\displaystyle p^{*}(x)$
$\displaystyle=\int_{0}^{x}dy\,p_{+}(x,y)\sigma_{0}(y,x_{0})+\int_{x}^{L}dy\,p_{-}(x,y)\sigma_{0}(y,x_{0})$
$\displaystyle={\mathcal{A}}(x,x_{0}){\rm e}^{\eta
x}+{\mathcal{B}}(x,x_{0}){\rm e}^{-\eta x},$ (3.20)

where

$\displaystyle{\mathcal{A}}(x,x_{0})$ (3.21a)
$\displaystyle=\int_{0}^{L}dy\,A_{1}(y)\sigma_{0}(y,x_{0})-\int_{0}^{x}dy\,\Gamma_{-}(y)\sigma_{0}(y,x_{0})$
$\displaystyle{\mathcal{B}}(x,x_{0})$ (3.21b)
$\displaystyle=\int_{0}^{L}dy\,B_{1}(y)\sigma_{0}(y,x_{0})+\int_{0}^{x}dy\,\Gamma_{+}(y)\sigma_{0}(y,x_{0}).$

Moreover,

$\displaystyle\int_{0}^{x}dy\,\Gamma_{\pm}(y)\sigma_{0}(y,x_{0})$ (3.22)
$\displaystyle\quad=f_{\pm}(x):=\frac{\sqrt{r/D}\Lambda_{0}{\rm
e}^{-x_{0}\xi_{0}}}{2}\frac{\left({\rm
e}^{x[\pm\eta+\xi_{0}]}-1\right)}{\pm\eta+\xi_{0}}$

for $x<x_{0}$ and

$\displaystyle\int_{0}^{x}dy\,\Gamma_{\pm}(y)\sigma_{0}(y,x_{0})$ (3.23)
$\displaystyle\quad=f_{\pm}(x_{0})+\frac{\sqrt{r/D}\Lambda_{0}{\rm
e}^{x_{0}\xi_{0}}}{2}\frac{\left({\rm e}^{x[\pm\eta-\xi_{0}]}-{\rm
e}^{x_{0}[\pm\eta-\xi_{0}]}\right)}{\pm\eta-\xi_{0}}$

for $x>x_{0}$. In Fig. 8 we plot the corresponding interfacial entropy
production rate ${\mathcal{I}}^{*}_{\rm int}$ as a function of $r$ for
different values of the decay parameter $\xi_{0}$ in the definition of the
resetting position density given by Eq. (3.19). Since $\sigma_{0}(x)$ becomes
a uniform distribution in the limit $\xi_{0}\rightarrow 0$, it follows that
${\mathcal{I}}^{*}_{\rm int}\rightarrow 0$ by symmetry. On the other hand, in
the limit $\xi_{0}\rightarrow\infty$, we recover the curve obtained for
resetting to $x_{0}$. Finally, Eq. (3.10) implies that for $0<\xi_{0}<\infty$,
there is also a positive contribution to the average entropy production rate
from resetting. The stationary version takes the form

$\displaystyle{\mathcal{I}}^{*}_{r}$ (3.24)
$\displaystyle=r\int_{0}^{L}dx\,[p^{*}(x)-\sigma_{0}(x,x_{0})]\ln(p^{*}(x))-\ln\sigma_{0}(x,x_{0})].$

Example plots of ${\mathcal{I}}^{*}_{r}$ as a function of $r$ and $\xi_{0}$
are shown in Fig. 9. As expected, ${\mathcal{I}}^{*}_{r}$ blows up in the
limit $\xi_{0}\rightarrow\infty$ since the corresponding Kullback-Leibler
divergences become singular.

##  IV Probabilistic interpretation of the entropy contribution
${\mathcal{I}}_{\rm int}$

In Sect. II we analyzed Brownian motion across a semipermeable interface using
a Fokker-Planck description of the distribution of sample paths. In order to
understand the origins of the interfacial entropy production term
${\mathcal{I}}_{\rm int}$, see Eq. (2.17) and its higher-dimensional analog
(2.32), we turn to a probabilistic description of individual trajectories
based on so-called snapping out Brownian motion Lejay16 ; Lejay18 ;
Bressloff22a ; Bressloff23 . Here we only cover the essential elements
necessary for interpreting ${\mathcal{I}}_{\rm int}$ in 1D. Extensions of the
probabilistic framework to higher-dimensional interfaces can be found in Ref.
Bressloff23 .

Figure 10: Snapping out BM. (a) Single-particle diffusing across a
semipermeable interface at $x=0$. (b) Decomposition of snapping out BM into
the random switching between two partially reflected BMs in the domains
$\Omega_{\pm}$.

###  IV.1 Snapping out Brownian motion

The dynamics of snapping out BM is formulated in terms of a sequence of killed
reflected Brownian motions in either $\Omega_{-}=(-\infty,0^{-}]$ or
$\Omega_{+}=[0^{+},\infty)$ Lejay16 ; Lejay18 ; Bressloff22a ; Bressloff23 .
Let ${\mathcal{T}}_{n}$ denote the time of the $n^{\rm th}$ killing (with
${\mathcal{T}}_{0}=0$). Immediately after the killing event, the position of
the particle is taken to be

$\displaystyle X({\mathcal{T}}_{n}^{+})=\lim_{\epsilon\rightarrow
0^{+}}\left[-Y_{n}\epsilon+(1-Y_{n})\epsilon\right],$ (4.1)

where $Y_{n}$ is an independent Bernoulli random variable with
$\mathbb{P}[Y_{n}=1]=\mathbb{P}[Y_{n}=0]=1/2$. Suppose that
$X(t)\in\Omega_{+}$ for $t\in({\mathcal{T}}_{n},{\mathcal{T}}_{n+1})$, that
is, $X({{\mathcal{T}}_{n}^{+}})=0^{+}$, and introduce the boundary local time
Levy40 ; Ito63 ; Dynkin65 ; McKean75 ; Grebenkov06

$\displaystyle L_{n}^{+}(t)=\lim_{\epsilon\rightarrow
0^{+}}\frac{D}{\epsilon}\int_{0}^{t}I\\{0\leq
X({\mathcal{T}}_{n}+s)\leq\epsilon\\}ds,\quad$ (4.2)

where $I$ is the indicator function. The boundary local time $L_{n}^{+}(t)$ is
a Brownian functional that tracks the amount of the time the particle is in
contact with the right-hand side of the interface over the time interval
$[{\mathcal{T}}_{n},t]$. It can be proven that the local time exists, and is a
continuous, positive increasing function of time. The SDE for $X(t)$,
$t\in({\mathcal{T}}_{n},{\mathcal{T}}_{n+1})$, is given by the so-called
Skorokhod equation for reflected BM in the half-line $\Omega_{+}$:

$\displaystyle dX(t)=\frac{1}{\gamma}F(X(t))dt+\sqrt{2D}dW(t)+dL_{n}(t)$ (4.3)

for $t\in({\mathcal{T}}_{n},{\mathcal{T}}_{n+1})$, where $W(t)$ is a Wiener
process with $W(0)=0$. Formally speaking,

$dL^{+}_{n}(t)=\lim_{\epsilon\rightarrow 0^{+}}\delta(X(t)-\epsilon)dt,$ (4.4)

so that each time the particle hits the interface it is given a positive
impulsive kick back into the domain. The time of the next killing is then
determined by the condition

$\displaystyle{\mathcal{T}}_{n+1}={\mathcal{T}}_{n}+\inf\left\\{t>0,\
L_{n}^{+}(t)\geq\widehat{\ell}\right\\},$ (4.5)

where $\widehat{\ell}$ is an independent randomly generated local time
threshold with

$\displaystyle\mathbb{P}[\widehat{\ell}>\ell]={\rm e}^{-\kappa_{0}\ell},\
\ell\geq 0.$ (4.6)

On the other hand, if $X({{\mathcal{T}}_{n}^{+}})=0^{-}$ then the next round
of reflected BM takes place in the domain $\Omega_{-}$. The corresponding SDE
is

$\displaystyle dX(t)=\frac{1}{\gamma}F(X(t))dt+\sqrt{2D}dW(t)-dL_{n}^{-}(t)$
(4.7)

with $t\in({\mathcal{T}}_{n},{\mathcal{T}}_{n+1})$, $X(t)\in\Omega_{-}$,

$\displaystyle L_{n}^{-}(t)=\lim_{\epsilon\rightarrow
0^{+}}\frac{D}{\epsilon}\int_{0}^{t}I\\{-\epsilon\leq
X({\mathcal{T}}_{n}+s)\leq 0\\}ds$ (4.8)

and

$\displaystyle{\mathcal{T}}_{n+1}={\mathcal{T}}_{n}+\inf\left\\{t>{\mathcal{T}}_{n}:\quad
L_{n}^{-}(t)\geq\widehat{\ell}\right\\}.$ (4.9)

In summary, the dynamics of snapping out BM consists of sewing together
successive rounds of reflected BM, each of which evolves according to the SDE
(4.3) or (4.7), see Fig. 10. Each round is killed when the local time at the
right-hand or left-hand side of the interface exceeds an exponentially
distributed random threshold. (The threshold is independently generated each
round.) Following each round of killing, an unbiased coin is thrown to
determine which side of the interface the next round occurs. It is this
randomization that accounts for the term ${\mathcal{I}}_{\rm int}$ appearing
in Eq. (2.16). That is, ${\mathcal{I}}_{\rm int}$ is given by the product of
the flux ${\mathcal{J}}(t)$ across the interface, which specifies the
effective rate of randomization, and the corresponding entropy difference $\ln
p(0^{-},t)-\ln p(0^{+},t)$. Of course, this assumes that snapping out BM
generates sample paths whose distribution is given by the solution of the
corresponding FP Eq. (2.1). We sketch the basic proof based on renewal theory.
For an alternative proof in 1D see Ref. Lejay16  and for the generalization to
higher spatial dimensions see Ref. Bressloff23 . Let $p(z,t)$ denote the
probability density of snapping out BM for $p(x,0)=\delta(x-x_{0})$ and
$x_{0}>0$. Let $q(z,t|x_{0})$ be the corresponding solution for partially
reflected BM in $\Omega_{+}$. (It is straightforward to generalize the
analysis to the case of a general distribution of initial conditions
$g(x_{0})$ that spans both sides of the interface.) The densities $p$ are
related to $q$ according to the last renewal equation Bressloff22a ;
Bressloff23

$\displaystyle p(x,t)=q(x,t|x_{0})$ (4.10a)
$\displaystyle+\frac{\kappa_{0}}{2}\int_{0}^{t}q(x,\tau|0)[p(0^{+},t-\tau)+p(0^{-},t-\tau)]d\tau,\quad
x>0,$ $\displaystyle p(x,t)$ (4.10b)
$\displaystyle=\frac{\kappa_{0}}{2}\int_{0}^{t}q(|x|,\tau|0)[p(0^{+},t-\tau)+p(0^{-},t-\tau)]d\tau\quad
x<0.$

The first term on the right-hand side of Eq. (4.10a) represents all sample
trajectories that have never been absorbed by the barrier at $x=0^{\pm}$ up to
time $t$. The corresponding integrand represents all trajectories that were
last absorbed (stopped) at time $t-\tau$ in either the positively or
negatively reflected BM state and then switched to the appropriate sign to
reach $x$ with probability 1/2. Since the particle is not absorbed over the
interval $(t-\tau,t]$, the probability of reaching $x\in\Omega_{+}$ starting
at $x=0^{\pm}$ is $q(x,\tau|0)$. The probability that the last stopping event
occurred in the interval $(t-\tau,t-\tau+d\tau)$ irrespective of previous
events is $\kappa_{0}d\tau$. A similar argument holds for Eq. (4.10b).

The renewal Eqs. (4.10) can be used to express $p$ in terms of $q$ using
Laplace transforms. First,

$\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\widetilde{q}(x,s|x_{0})+\frac{\kappa_{0}}{2}\widetilde{q}(x,s|0)[\widetilde{p}(0^{+},s)+\widetilde{p}(0^{-},s)],$
$\displaystyle\qquad x>0,$ (4.11a) $\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\frac{\kappa_{0}}{2}\widetilde{q}(|x|,s|0)[\widetilde{p}(0^{+},s)+\widetilde{p}(0^{-},s)],\quad
x<0.$ (4.11b)

Setting $x=0^{\pm}$ in equation (4.11), summing the results and rearranging
shows that

$\widetilde{p}(0^{+},s)+\widetilde{p}(0^{-},s)=\frac{\widetilde{q}(0,s|x_{0})}{1-\kappa_{0}\widetilde{q}(0,s|0)}.$
(4.12)

Substituting back into equations (4.11) yields the explicit solution

$\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\widetilde{q}(x,s|x_{0})+\frac{\kappa_{0}\widetilde{q}(0,s|x_{0})/2}{1-\kappa_{0}\widetilde{q}(0,s|0)}\widetilde{q}(x,s|0),\quad
x>0,$ (4.13a) $\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\frac{\kappa_{0}\widetilde{q}(0,s|x_{0})/2}{1-\kappa_{0}\widetilde{q}(0,s|0)}\widetilde{q}(|x|,s|0),\quad
x<0.$ (4.13b)

Calculating the full solution $p(x,t)$ thus reduces to the problem of finding
the corresponding solution $q(x,t|x_{0})$ of partially reflected BM in
$\Omega_{+}$. As we have shown elsewhere, this then establishes that $p(x,t)$
satisfies the interfacial conditions (2.1c).

Finally, note that it is also possible to incorporate the directional
asymmetry of Eq. (2.34) into snapping out BM Bressloff23 . This is achieved by
introducing a bias in the switching between the positive and negative
directions of reflected BM following each round of killing. More specifically,
the independent Bernoulli random variable $Y_{n}$ in Eq. (4.1) now has the
biased probability distribution $\mathbb{P}[Y_{n}=0]=\alpha$ and
$\mathbb{P}[Y_{n}=1]=1-\alpha$ for $0<\alpha<1$. The 1D renewal Eq. (4.11)
becomes

$\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\widetilde{q}(x,s|x_{0})+\frac{\kappa_{0}\alpha}{2}\widetilde{q}(x,s|0)[\widetilde{p}(0^{+},s)+\widetilde{p}(0^{-},s)],$
$\displaystyle\qquad x>0$ (4.14a) $\displaystyle\widetilde{p}(x,s)$
$\displaystyle=\frac{\kappa_{0}[1-\alpha]}{2}\widetilde{q}(|x|,s|0)[\widetilde{p}(0^{+},s)+\widetilde{p}(0^{-},s)],\quad
x<0.$ (4.14b)

Setting $x=0^{\pm}$ in Eqs. (4.14), summing the results and rearranging
recovers Eq. (4.12). It can then be shown that snapping out BM with biased
switching and $\alpha>1/2$ is equivalent to single-particle diffusion through
a directed semipermeable barrier with an effective permeability
$\kappa_{0}\alpha/2$ and bias $\sigma=(1-\alpha)/\alpha$.

###  IV.2 Stochastic entropy production

The probabilistic formulation of snapping out BM can also be used to construct
a stochastic version of entropy production. For the sake of illustration, we
focus on the 1D unbiased case. Let $X(t)$ be the position of the Brownian
particle at time $t$ and consider the stochastic system entropy

$S^{\rm sys}(t)=-\ln p(X(t),t),$ (4.15)

where $p(x,t)$ is the solution of Eqs. (2.1). Differentiating both sides of
Eq. (4.15) with respect to $t$ and using the chain rule in the Stratonovich
version of stochastic calculus gives

$\displaystyle dS^{\rm sys}(t)$
$\displaystyle=-\frac{1}{p(X(t),t)}\frac{\partial p(X(t),t)}{\partial
t}dt-\frac{1}{p(X(t),t)}\frac{\partial p(X(t),t)}{\partial x}\circ dX(t)$
(4.16) $\displaystyle\quad-\frac{\kappa_{0}}{2}\lim_{\epsilon\rightarrow
0^{+}}[\delta(X(t)-\epsilon)-\delta(X(t)+\epsilon)]\ln[p(0^{-},t)/p(0^{+},t)]dt,$

with

$\displaystyle dX(t)$
$\displaystyle=-\frac{1}{\gamma}V^{\prime}(X(t))dt+\sqrt{2D}dW+D[1-\kappa_{0}dt/2]\lim_{\epsilon\rightarrow
0^{+}}[\delta(X(t)-\epsilon)-\delta(X(t)+\epsilon)]dt.$ (4.17)

The second-term on the right-hand side of Eq. (4.16) takes into account the
entropy change due to an infinitesimal change in particle position that does
not cross the interface. Hence, the Dirac delta functions in Eq. (4.17) are
the local time impulses that reflect the particle at $x=0^{\pm}$, and the
factors $[1-\kappa_{0}dt/2]$ represent the probability that reflection occurs.
The third term on the right-hand side of Eq. (4.16) can be understood as
follows. If the particle is located at $x=0^{\pm}$ then the probability of the
reflected BM being killed in the interval $[t,t+dt]$ is $\kappa_{0}dt$, after
which there is a probability of 1/2 that it switches to the other side of the
interface. This results in an entropy change equal to $\Delta S^{\rm
sys}=\pm\ln[p(0^{-},t)/p(0^{+},t)]$, whose sign depends on the crossing
direction. A similar interpretation applies to the fourth term. In terms of
the probability flux $J(x,t)$, we have

$\displaystyle-\frac{1}{p(X(t),t)}\frac{\partial p(X(t),t)}{\partial x}\circ
dX(t)=\frac{J(X(t),t)}{Dp(X(t),t)}\circ dX(t)-dS^{\rm env}(X(t),t),\quad
dS^{\rm env}(X(t),t)=-\frac{V^{\prime}(X(t))}{T}\circ dX(t),$ (4.18)

where $dS^{\rm env}(X(t),t)$ is the the infinitesimal change in the
environmental entropy. In order to determine the average entropy production
rate we need to take expectations with respect to the white noise process.
This is simplified by converting from Stratonovich to Itô calculus Peliti21 .
In particular, to leading order in $dt$,

$\displaystyle\frac{J(X(t),t)}{Dp(X(t),t)}\circ dX$
$\displaystyle=-\frac{J(X(t),t)V^{\prime}(X(t))}{Tp(X(t),t)}dt+\sqrt{\frac{2}{D}}\frac{J(X(t),t)}{p(X(t),t)}\circ
dW+\frac{J(X(t),t)}{Dp(X(t),t)}\lim_{\epsilon\rightarrow
0^{+}}[\delta(X(t)-\epsilon)-\delta(X(t)+\epsilon)]dt$
$\displaystyle=-\frac{J(X(t),t)V^{\prime}(X(t))}{Tp(X(t),t)}dt+\sqrt{\frac{2}{D}}\frac{J(X(t),t)}{p(X(t),t)}\cdot
dW+\frac{1}{p(X(t),t)}\frac{\partial J(X(t),t)}{\partial x}\ dt$
$\displaystyle\quad-\frac{J(X(t),t)}{p^{2}(X(t),t)}\frac{\partial
p(X(t),t)}{\partial x}dt,$

since $J(0^{-},t)=J(0^{+},t)$. Hence, we can rewrite Eq. (4.18) as

$\displaystyle dS^{\rm sys}(X(t),t)+dS^{\rm env}(X(t),t)$
$\displaystyle=-\frac{1}{p(X(t),t)}\left[\frac{\partial p(X(t),t)}{\partial
t}-\frac{\partial J(X(t),t)}{\partial
x}\right]dt+\sqrt{\frac{2}{D}}\frac{J(X(t),t)}{p(X(t),t)}dW$ (4.19)
$\displaystyle\quad+\frac{J^{2}(X(t),t)}{Dp^{2}(X(t),t)}dt-\frac{\kappa_{0}}{2}\lim_{\epsilon\rightarrow
0^{+}}[\delta(X(t)-\epsilon)-\delta(X(t)+\epsilon)]\ln[p(0^{-},t)/p(0^{+},t)]dt.$

We now average each term in Eq. (4.19) with respect to the white noise process
using the following identity for any integrable function $g(X(t))$:

$\displaystyle\left\langle g(X(t)\right\rangle$
$\displaystyle=\left\langle\fint dx\,\delta(x-X(t))g(x)\right\rangle$ (4.20)
$\displaystyle=\fint dx\,g(x)\left\langle\delta(x-X(t)\right\rangle=\fint
dx\,g(x)p(x,t).$

First,

$\displaystyle\left\langle\frac{1}{p(X(t),t)}\frac{\partial
p(X(t),t)}{\partial t}\right\rangle$ $\displaystyle\quad=\fint
dx\frac{\partial p(x,t)}{\partial t}=\frac{\partial}{\partial t}\fint
dx\,p(x,t)=0$ (4.21)

by conservation of probability. Second,

$\displaystyle\left\langle\frac{1}{p(X(t),t)}\frac{\partial
J(X(t),t)}{\partial x}\right\rangle$ $\displaystyle\quad=\fint
dx\frac{\partial J(x,t)}{\partial x}=J(0^{-},t)-J(0^{+},t)=0.$ (4.22)

Taking expectation of the Wiener process in the Itô product terms also gives
zero. Hence, combining the various results recovers Eq. (2.16), indicating
that we can reverse the order of integration and differentiation so that

$\displaystyle\left\langle\frac{dS^{\rm
sys}(X(t),t)}{dt}\right\rangle=\frac{d}{dt}\bigg{\langle}S^{\rm
sys}(X(t),t)\bigg{\rangle}$ (4.23)

etc.

##  V Discussion

In this paper we showed how the presence of a semipermeable interface
${\mathcal{S}}$ increases the average rate of entropy production of a single
diffusing particle by an amount that is equal to the product of the flux
through the interface and the logarithm of the ratio of the probability
density on either side of the interface, integrated along ${\mathcal{S}}$. We
illustrated the theory using the example of diffusion with stochastic
resetting on a circle, and showed that the average rate of interfacial entropy
production in the NESS is a nonmonotonic function of the resetting rate and
the permeability. Finally, we presented a probabilistic interpretation of the
interfacial entropy production rate that is based on snapping out BM. The
latter represents individual stochastic trajectories as sequences of partially
reflected BMs that are restricted to one side of the interface or the other.
When a given round of partially reflected BM is terminated, a Bernoulli random
variable is used to determine which side of the interface the next round takes
place. We identified this switching process as the source of interfacial
entropy production. Moreover, we showed how a biased switching process is
equivalent to a directionally biased interface arising from a jump
discontinuity in the chemical potential. The latter contributes to the
dissipation of heat into the environment. Snapping out BM also allowed us to
construct a stochastic version of entropy production defined along individual
trajectories. Averaging with respect to the distribution of trajectories
recovered the expression for the average rate of entropy production obtained
from the Gibbs-Shannon entropy.

One direction for future work would be to relate the stochastic entropy for
diffusion through a semipermeable interface to the ratio of forward and
backward path probabilities Seifert12 ; Peliti21 . More specifically, a
fundamental result of stochastic thermodynamics is that for many continuous
stochastic processes, the total stochastic or instantaneous entropy production
can be expressed as

$S^{\rm tot}(t)=\ln\left[\frac{{\mathcal{P}}[X(\tau),0\leq\tau\leq
t]}{{\mathcal{P}}[X(t-\tau),0\leq\tau\leq t]}\right].$ (5.1)

Such a relationship provides a basis for deriving a variety of fluctuation
relations Seifert12 ; Peliti21 . The corresponding average production rate in
steady state is then

${\mathcal{R}}^{\rm
tot}=\lim_{t\rightarrow\infty}\frac{1}{t}\left\langle\ln\left[\frac{{\mathcal{P}}[X(\tau),0\leq\tau\leq
t]}{{\mathcal{P}}[X(t-\tau),0\leq\tau\leq t]}\right]\right\rangle.$ (5.2)

One way to establish a result of the form (5.1) is to use path integrals.
Within a path integral framework, one could treat diffusion as a random walk
on a lattice in which a semipermeable barrier is represented in terms of local
defects Powles92 ; Kenkre08 ; Novikov11 ; Kay22 .

Finally, note that in this paper we considered a mesoscopic model of diffusion
through a semipermeable interface, which involved phenomenological parameters
such as the permeability $\kappa_{0}$ and the directional bias $\sigma$. These
also appeared as parameters in snapping out BM, with $\kappa_{0}$ determining
the rate at which each round of partially reflected BM is killed and $\sigma$
specifying the bias of the switching Bernoulli process. Another direction of
future work would be to develop a microscopic model of a semipermeable
interface that identifies the biophysical mechanisms underlying $\kappa_{0}$,
$\sigma$, and interfacial entropy production. Along these lines, we have
recently proposed a more general model of snapping out BM, in which each round
of partially reflected BM is killed according to a more general threshold
distribution than the exponential (4.6) Bressloff22a ; Bressloff23 . The
corresponding effective permeability becomes a time-dependent function that
can have heavy tails.

## References

  * (1) L. Peliti and S. Pigolotti, Stochastic Thermodynamics (Princeton University Press, Princeton 2021)
  * (2) Sekimoto, K. Stochastic Energetics (Lecture Notes in Physics, vol. 799) (Springer, 2010).
  * (3) U. Seifert, Stochastic thermodynamics, fluctuation theorems and molecular machines, Rep. Prog. Phys. 75, 126001 (2012).
  * (4) L. Cocconi, R. Garcia-Millan, Z. Zhen, B. Buturca and G. Pruessner, Entropy production in exactly solvable systems, Entropy 22, 1252 (2020).
  * (5) U. Seifert, Entropy production along a stochastic trajectory and an integral fluctuation theorem, Phys. Rev. Lett. 95 040602 (2005).
  * (6) C. Jarzynski, Equalities and inequalities: Irreversibility and the second law of thermodynamics at the nanoscale, Annu. Rev. Condens. Matter Phys. 2 329-351 (2011).
  * (7) E. M. Sevick, R. Prabhakar, S. R. Williams and D. J. Searles, Fluctuation theorems, Annu. Rev. Phys. Chem. 59, 603-633 (2008).
  * (8) R. Chetrite and K. Gawedzki, Fluctuation relations for diffusion processes. Communications in Mathematical Physics 282, 469-518 (2008).
  * (9) R. Chetrite and S. Gupta, Two refreshing views of fluctuation theorems through kinematics elements and exponential martingale. J. Stat. Phy. 143 543 (2011).
  * (10) E. Roldan, I. Neri, S. Pigolotti and F. Julicher, Generic properties of stochastic entropy production. Physical review letters 119, 140604 (2017).
  * (11) I. Neri, E. Roldan, S. Pigolotti and F. Jülicher, Statistics of infima and stopping times of entropy production and applications to active molecular processes. Phys. Rev. X 7, 011019 (2017).
  * (12) I. Neri, E. Roldán, S. Pigolotti and F. Jülicher, Integral fluctuation relations for entropy production at stopping times. J. Stat. Mech, 104006 (2019).
  * (13) H. Ge, C. Jia and X. Jin, Martingale structure for general thermodynamic functionals of diffusion processes under second-order averaging. J. Stat. Phys. 184, 1-41 (2021).
  * (14) E. Roldán, I. Neri, R. Chetrite, S. Gupta, S. Pigolotti, F. Jülicher and K. Sekimoto, Martingales for physicists, arXiv:2210.09983v3 (2023).
  * (15) R. Phillips, J. Kondev, J. Theriot, H. G. Garcia and N. Orme Physical Biology of the Cell Garland, New York (2012)
  * (16) V. Nikonenko and N. Pismenskaya (Eds.). Ion and Molecule Transport in Membrane Systems (special issue). Int. J. Mol. Sci. 22 3556 (2021).
  * (17) P. C. Bressloff Stochastic Processes in Cell Biology. Springer Switzerland (2021)
  * (18) J. E. Tanner Transient diffusion in a system partitioned by permeable barriers. application to NMR measurements with a pulsed field gradient. J. Chem. Phys. 69 1748 (1978)
  * (19) A. Coy and P. T. Callaghan, Pulsed gradient spin echo nuclear magnetic resonance for molecules diffusing between partially reflecting rectangular barriers. J. Chem. Phys. 101 4599-4609 (1994)
  * (20) D. S. Grebenkov, Pulsed-gradient spin-echo monitoring of restricted diffusion in multilayered structures. J. Magn. Reson. 205 181-195 (2010)
  * (21) G. Pontrelli, and F. de Monte, Mass diffusion through two-layer porous media: an application to the drug-eluting stent. Int. J. Heat Mass Transf. 50 3658-3669 (2007)
  * (22) H. Todo, T. Oshizaka, W. R. ,Kadhum and K. Sugibayashi, Mathematical model to predict skin concentration after topical application of drugs. Pharmaceutics 5 634-651 (2013)
  * (23) D. Li and H. Wang, Recent developments in reverse osmosis desalination membranes J. Mater. Chem. 20 4551 (2010).
  * (24) J. Assis, H. C. Giacomini and M. C. Ribeiro Road permeability index: evaluating the heterogeneous permeability of roads for wildlife crossing Ecol. Indic. 99 (2019) 365
  * (25) H. L. Beyer, E. Gurarie, L. Børger, M. Panzacchi, M. Basille, I. Herfindal, B. Van Moorter, S. R. Lele and J. Matthiopoulos “You shall not pass!”: quantifying barrier permeability and proximity avoidance by animals J. Anim. Ecol. 85 (2016) 43
  * (26) V. M. Kenkre and L. Giuggioli Theory of the Spread of Epidemics and Movement Ecology of Animals: An Interdisciplinary Approach Using Methodologies of Physics and Mathematics Cambridge University Press, Cambridge, UK (2021).
  * (27) O. Kedem and A. Katchalsky, Thermodynamic analysis of the permeability of biological membrane to non-electrolytes. Biochim. Biophys. Acta 27 229-246 (1958).
  * (28) A. Katchalsky and O. Kedem, Thermodynamics of Flow Processes in Biological Systems. Biophys. J. 2 53-78 (1962).
  * (29) A. Kargol, M. Kargol and S. Przestalski, The Kedem-Katchalsky equations as applied for describing substance transport across biological membranes, Cell. Mol. Biol. Lett. 2 117-124 (1996)
  * (30) V. Aho, K. Mattila, T. Kühn, P. Kekäläinen, O. Pulkkine, R. B. Minussi, M. Vihinen-Ranta and J. Timonen, Diffusion through thin membranes: Modeling across scales. Phy. Rev. E 93 043309 (2016)
  * (31) A. Lejay, The snapping out brownian motion, Ann. Appl. Prob. 26, 1727-1742 (2016).
  * (32) A. Lejay, Monte Carlo estimation of the mean residence time in cells surrounded by thin layers, Math. Comp. Simul. 143, 65-77 (2018).
  * (33) P. C. Bressloff, A probabilistic model of diffusion through a semi-permeable barrier, Proc. R. Soc. A 478, 20220615 (2022).
  * (34) P. C. Bressloff, Renewal equations for single-particle diffusion through a semi-permeable interface, Phys. Rev. E 107 014110 (2023).
  * (35) P. Lèvy, Sur certains processus stochastiques homogènes. Compos. Math. 7, 283 (1940).
  * (36) K. Itô and H. P. McKean, Brownian motions on a half line. Illinois J. Math. 7 181-231 (1963).
  * (37) E. B. Dynkin, Markov Processes I and II (Springer Verlag Berlin 1965).
  * (38) H. P. McKean, Brownian local time, Adv. Math. 15 91-111 (1975)
  * (39) D. S. Grebenkov, Partially reflected Brownian motion: A stochastic approach to transport phenomena, in “Focus on Probability Theory”, Ed. L. R. Velle, pp. 135-169 (Hauppauge: Nova Science Publishers 2006)
  * (40) M. R. Evans and S. N. Majumdar, Diffusion with stochastic resetting, Phys. Rev. Lett. 106 160601 (2011).
  * (41) M. R. Evans and S. N. Majumdar, Diffusion with optimal resetting, J. Phys. A Math. Theor. 44 435001 (2011).
  * (42) M. R. Evans and S. N. Majumdar, Diffusion with resetting in arbitrary spatial dimension, J. Phys. A 47, 285001 (2014).
  * (43) M. R. Evans, S. N. Majumdar, and G. Schehr, Stochastic resetting and applications. J. Phys. A 53 193001 (2020).
  * (44) J. Fuchs, S. Goldt, and U. Seifert, Stochastic thermodynamics of resetting, Europhys. Lett. 113, 60009 (2016).
  * (45) A. Pal and S. Rahav, Integral fluctuation theorems for stochastic resetting systems, Phys. Rev. E 96, 062135 (2017).
  * (46) D. M. Busiello, D. Gupta, and A. Maritan, Entropy production in systems with unidirectional transitions, Phys. Rev. Res. 2, 023011 (2020).
  * (47) D. Gupta, C. A. Plata, and A. Pal, Work Fluctuations and Jarzynski Equality in Stochastic Resetting, Phys. Rev. Lett. 124, 110608 (2020).
  * (48) A. Pal, S. Reuveni, and S. Rahav, Thermodynamic uncertainty relation for systems with unidirectional transitions, Phys. Rev. Res. 3, 013273 (2021).
  * (49) F. H. Gonzalez, A. P. Riascos, and D. Boyer, Diffusive transport on networks with stochastic resetting to multiple nodes, Phys. Rev. E 103, 062126 (2021).
  * (50) J. Q. Toledo-Marin and D. Boyer, First passage time and information of a one-dimensional Brownian particle with stochastic resetting to random positions, Physica A, 625, 129027 (2023)
  * (51) F. Mori, K. S. Olsen and S. Krishnamurthy, Entropy production of resetting processes, Phys. Rev. Res. 5 123103 (2023).
  * (52) H. Alston, L. Cocconi, and T. Bertrand, Non-equilibrium thermodynamics of diffusion in fluctuating potentials, J. Phys. A: Math. Theor. 55, 274004 (2022).
  * (53) P. C. Bressloff. Diffusion-mediated surface reactions and stochastic resetting. J. Phys. A 55 275002 (2022).
  * (54) Z. Benkhadaj and D. S. Grebenkov, Encounter-based approach to diffusion with resetting. Phys. Rev. E 106 044121 (2022)
  * (55) P. C. Bressloff. Diffusion with stochastic resetting screened by a semi-permeable interface. J. Phys. A 56 105001 (2023).
  * (56) O. Farago, Algorithms for Brownian dynamics across discontinuities. J. Comput. Phys. 423 109802 (2020).
  * (57) J. G. Powles, M. Mallett, G. Rickayzen and W. Evans, Exact analytic solutions for diffusion impeded by an infinite array of partially permeable barriers Proc. R. Soc. Lond. A 436 391 (1992)
  * (58) V. M. Kenkre, L. Giuggiol and Z. Kalay Molecular motion in cell membranes: analytic study of fence-hindered random walks Phys. Rev. E 77 051907 (2008)
  * (59) D. Novikov, E. Fieremans, J. Jensen and J. A. Helpern, Random walks with barriers. Nat. Phys. 7 508-514 (2011)
  * (60) T. Kay and L. Giuggioli, Diffusion through permeable interfaces: Fundamental equations and their application to first-passage and local time statistics. Phys. Rev. Res. 4 L032039 (2022).