# RSO: A Novel Reinforced Swarm Optimization Algorithm for Feature Selection

Hritam Basak *  — Department of Electrical Engineering
Jadavpur University
Kolkata-700032, India
<EMAIL_ADDRESS>Mayukhmali Das *  — Department of Electronics
Engineering
Jadavpur University
Kolkata-700032, India
<EMAIL_ADDRESS>Susmita Modak *  — Department of Electronics
Engineering
Techno India University
Kolkata-700091, India
<EMAIL_ADDRESS>
###### Abstract

Swarm optimization algorithms are widely used for feature selection before
data mining and machine learning applications. The metaheuristic nature-
inspired feature selection approaches are used for single-objective
optimization task, though the major problem is their frequent premature
convergence, leading to weak contribution to data mining. In this paper, we
propose a novel feature selection algorithm named Reinforced Swarm
Optimization (RSO) leveraging some of the existing problems in feature
selection. This algorithm embeds the widely used Bee Swarm Optimization (BSO)
algorithm along with Reinforcement Learning (RL) to maximize the reward of a
superior search agent and punish the inferior ones. This hybrid optimization
algorithm is more adaptive and robust with a good balance between exploitation
and exploration of the search space. The proposed method is evaluated on 25
widely known UCI dataset containing a perfect blend of balanced and imbalanced
data. The obtained results are compared with several other popular and recent
feature selection algorithms with similar classifier configuration. The
experimental outcome shows that our proposed model outperforms BSO in 22 out
of 25 instances (88%). Moreover, experimental results also show that RSO
performs the best among all the methods compared in this paper in 19 out of 25
cases (76%), establishing the superiority of our proposed method.

###### Index Terms:

Optimization, Swarm Intelligence, Reinforcement Learning, Feature Selection.

##  I Introduction

An optimization problem is the task of choosing a set of values systematically
to maximize or minimize a given function with a given set of input data. More
specifically, optimization is the task of selecting the ”best available” of
some specific objective function in a specified domain, provided that
varieties of objective functions and different domains available. The past few
years have seen an overwhelming growth of the application of single-objective
and multi-objective optimization algorithms in the domain of artificial
intelligence, predominantly in feature selection (FS) and is considered as the
preprocessing task for several machine learning applications. FS is the task
of efficiently selecting the subset of data from larger feature sets by
keeping the most relevant attributes, thereby reducing the dimensionality of
the feature set, and simultaneously retaining sufficient information to
perform classification of data. This is important because the irrelevant or
redundant features may often lead to poor classification performance in
machine learning problems with unnecessary computational cost [1].

In recent years, nature-inspired metaheuristic optimization algorithms, for
example Particle Swarm Optimization (PSO) [2], Grey Wolf Optimization (GWO)
[3], Genetic Algorithm (GA) [4], Bee Swarm Optimization (BSO) [5] are widely
used for selecting a good approximation (optimal) for various complex
optimization problems, though they do not ensure the selection of the best
solution always. The task of feature selection is challenging because for the
original feature set of $N$ cardinality the feature selection task is to
select the optimal subset among the $2^{N}$ intractable candidates. Hence, the
number of combinations of optimal feature selection grows exponentially with
the increase in the number of available features.

In literature, different feature-selection algorithms based on nature-
inspired, metaheuristic or heuristic optimization algorithms [6, 7, 8, 9] have
been recently employed for different machine learning applications. Swarm-
intelligence based optimization algorithms like Ant Colony Optimization [10,
11], Particle Swarm Optimization [12, 13] have been modified and applied
widely in recent years to serve the purpose of feature selection. Despite the
efficient performance of metaheuristic feature selection algorithms over
traditional machine learning approaches, the problem of an increasing amount
of data makes the task difficult. Hence, researches have been made to propose
hybrid optimization algorithms to improve the feature-selection performance
[14, 15, 16, 17].

In this paper, we propose Reinforced Swarm Optimization (RSO), a novel
optimization algorithm for feature selection that incorporates the features of
both reinforcement learning along with swarm intelligence based BSO algorithm.
BSO [5], is a metaheuristic optimization algorithm, that mimics the foraging
activities of bee colony and have been used in various domains including cloud
computing [18], maximum satisfiability problem (MAX-SAT) [19], document
retrieval [20], parallel computing [21], biomedical image analysis [22, 23],
and many more. On the other hand, reinforcement learning (RL) has been
integrated into BSO to make it more adaptive and robust powered by a suitable
balance between diversification and intensification of the search space,
compensating the local search of the BSO search agents.

##  II Proposed method

In this section, we describe the detailed working principle of the natural
bees and the inspiration behind the BSO algorithm in Section II-A, BSO
algorithm for optimal feature selection in Section II-B, reinforcement
learning and its effects in feature selection in Section II-C and the proposed
RSO algorithm, incorporating the features of reinforcement learning within BSO
in Section II-D.

###  II-A Intuitive behaviour of natural bees

Unlike other population-based methods, the BSO algorithm imitates the social
hierarchy of the natural bees namely scouts, foragers, onlookers, etc. [24]. A
prospective $forager$ is a bee agent with zero information about the
surrounding environment or search space and is unaware of the possible
location and type of any food source or potential threat. The $scout$ bee,
usually small in number, has the task of exploring the search space and gather
information regarding the food source and pass them to the $onlooker$, who
rests in the nest and processes the information collected from the foragers by
implementing a probabilistic approach about the most profitable food source
based on the information gathered and select the $dancers$ from numerous
employed $foragers$ post advertising the information and can redefine the
exploration trajectory towards the most profitable food-source. After
collecting nectar from the food source, the forager returns to the hive and
enters a decision-making process:

1) The food source is abandoned if the remaining nectar reaches scarcity or
gets completely exhausted. The employed forager bee turns into an unemployed
forager; 2) The search can continue without additional recruiters if a
sufficient amount of nectar remains in the food source; 3) A waggle dance is
performed by the forager bee to inform the nestmates about the source and the
collection of nectar from the source continues.

###  II-B BSO algorithm

Bee Swarm Optimization (BSO) is a metaheuristic optimization algorithm that is
inspired by the intelligent behaviour of self-organization, adaptation and
hierarchical task-management of the natural bee colony. Proposed by [5], the
BSO algorithm is an iterative search method that solves a particular instance
of optimization problem imitating the intelligent foraging behaviour and
probabilistic decision-making process of natural bees to select and exploit
the most profitable food source. Initially, the first reference solution,
known as $ReferenceSol$ is generated using heuristic and is considered as the
reference to determine other $N$ sets of similar solutions, together forming
the $SearchSpace$. The $SearchSpace$ is defined by a set of solutions
equidistant from the $ReferenceSol$ and the distance is inversely proportional
to a parameter named $Flip$, which determines the convergence of the search
process. Each of these solutions is considered as the starting point of local
search and a bee agent is assigned to each of them. The best and fittest
solution is passed to the congeners from the $Dance$ table which is further
used to select the next $ReferenceSol$. The reference solutions are stored in
a table named $Tab$ to avoid congestion. To avoid reaching local optima
instead of a global one, the parameter $ChanceMax$ is defined carefully. It is
defined as the maximum number of chance given to an artificial bee agent to
explore a $ReferenceSol$ before assigning another one. If a better solution is
found within the $ChanceMax$ range, intensification is done, otherwise,
diversification is performed. The search stops after reaching $MaxIter$, which
is the maximum number of iterations or after finding the global optima
$BestSol$. The working principle BSO algorithm is explained in Algorithm 1.

Input: Optimization problem
Output: Optimal solution
Number of Search Agents: $N$
Maximum number of iterations: $MaxIter$
Maximum number of chaces: $ChanceMax$

Initialize the BSO population $X_{i}\>\>\forall i=1,2,3,....,N$

$ReferenceSol$ found heuristically.

while t $<$ $MaxIter$ do

Insert $ReferenceSol$ into $Tab$ table

$SearchRegion$ initialized from $ReferenceSol$

Assigning each bee agent to every initial solution

for each search agent do

Local search of BSO population $X_{i}\>\>\forall i=1,2,3,....,N$

Store in $Dance$ table

end for

Calculate fitness of solutions found

Best solution assigned as new $ReferenceSol$

Update artificial bee positions.

if Optimal solution found then

Break loop

end if

$t=t+1$

end while

return $BestSol$

Algorithm 1 Pseudo-code for Bee Swarm Optimization algorithm.

###  II-C Reinforcement Learning

Reinforced learning, also known as the Q-learning algorithm, is a machine-
learning algorithm that deals with the environment with the notion of optimal
cumulative reward based on the outcomes of previously implemented sets of
actions. According to [25], it is defined as ”a way of programming agents by
reward and punishment without needing to specify how the task is to be
achieved”. Let $X=\\{x_{1},x_{2},....,x_{N}\\}$ be the set of states and
$Y=\\{y_{1},y_{2},....,y_{N}\\}$ be the set of actions, bound to select state
$x_{i}$ from $X$. A reward $r_{i}$ is received for every action $a_{i}$
performed in set $s_{i}$. The algorithm tries to learn an approach to map
$X\to Y$ in order to maximize the reward function which is defined by Equation
1.

$R_{x,y}(i)=r_{i}+\alpha r_{i+1}+\alpha^{2}r_{i+2}+....$ (1)

where $\alpha$ is defined as the ”discount parameter” and have range $[0,1]$.
The search agents tend towards long-term rewards if the $\alpha$ value tends
to 1 and short-term or immediate rewards if $\alpha$ tends towards zero.

Temporal Difference (TD) is one of the widely used approaches in residual
learning which incorporates the features of both the Monte Carlo (MC)
algorithm [26] and Markov Decision Process (MDP) [27]. Following the original
work of [28], we implement the recursive Q-learning approach, a specific TD
method, to calculate the immediate reward $Q$ by acting $y_{i}$ in set $x_{i}$
given by Equation 2.

$Q(x_{i},y_{i})=r(x_{i},y_{i})+\alpha\max
Q\left(\beta(x_{i},y_{i}),y_{t}\right)$ (2)

where $\beta(x_{i},y_{i})$ is the resulting state after performing action
$y_{i}$ over set $x_{i}$, $y_{t}$ is another $t^{th}$ action. However, in this
paper, we have slightly modified the equation to fit the purpose, given by
Equation 3.

$\begin{split}Q(x_{i},y_{i})=lr\times(r(x_{i},y_{i}))+(1-lr)\times
Q(x_{i},y_{i})\\\ +\alpha\max
Q\left(\beta(x_{i},y_{i}),y_{t}\right)\end{split}$ (3)

where $lr$ is the learning rate and $lr\in[0,1]$. The pseudo-code of the RL
algorithm is given by the Algorithm 2.

Initialize states $X_{i}\>\>\forall i=1,2,3,....N$

Initialize actions $Y_{i}\>\>\forall i=1,2,3,...N$

Initialize table elements $Q(x,y)\to 0$

for k $\leq$ N do

Current action $\to\>y_{k}$

Current state $\to\>x_{k}$

Execute $y_{k}$ over $x_{k}$

Immediate reward $\to$ $r_{k}$

New state obtained $x_{t}$

$Q(x_{k},y_{k})\longleftarrow r_{k}+\alpha\max(x_{t},y_{t})$

$k=k+1$

Update $x_{t}\longrightarrow x_{k}$

end for

Algorithm 2 Pseudo-code for Reinforcement learning algorithm. TABLE I: Summary of Dataset used Dataset | # Attributes | # Instances | # Classes | Dataset | # Attributes | # Instances | # Classes
---|---|---|---|---|---|---|---
Abalone | 9 | 4174 | 28 | Iris | 4 | 150 | 2
Australian | 12 | 690 | 2 | Liver | 7 | 345 | 2
Biodegrade | 41 | 1055 | 2 | LSVT | 309 | 126 | 2
Breastcancer | 9 | 286 | 2 | LungCancer | 56 | 32 | 3
Breastcancer Wisconcin | 32 | 569 | 2 | MovementLibras | 90 | 360 | 15
Chess | 6 | 28056 | 18 | Parkinson | 23 | 195 | 2
Spect | 22 | 267 | 2 | Sonar | 60 | 208 | 2
Congress | 16 | 435 | 2 | Thyroid | 6 | 215 | 3
Diabetes | 8 | 768 | 2 | Vowel | 10 | 901 | 15
Glass | 9 | 214 | 7 | WDBC | 30 | 569 | 2
Heart-C | 13 | 303 | 5 | Wine | 13 | 178 | 3
Hepatitis | 19 | 155 | 2 | Zoo | 16 | 101 | 7
Ionosphere | 34 | 351 | 2 |  |  |  |

###  II-D RSO: Reinforced Swarm Optimization

In this paper, we integrate Reinforcement Learning (RL) to Bee Swarm
Optimization (BSO) to improve the learning process by making search agents
learn from their previous experiences. One of the shortcomings of the BSO
algorithm can be pointed to as the absence of intelligence or memory in their
local search process which inhibits the agents to memorize the location of
previously found optima. This often results in the algorithm getting stuck in
local optima instead of the global one and makes the algorithm inefficient as
compared to other swarm-intelligence algorithms. To address this, we propose a
new algorithm by replacing the local-search algorithm with Q-learning to
enable the agents’ benefits from other search agents. In the context of FS,
the inclusion or deletion of a feature set from the optimal feature subset is
considered as the action whereas reward obtained is the improvement in
classification accuracy and reduction in feature subset as a secondary
constraint.

In the $t^{th}$ iteration, let $Y_{t}=\\{y_{t1},y_{t2},....,y_{tN}\\}$ be the
actions performed in set $X_{t}$ and $x_{t+1}$. The reward obtianed in set
$x_{t}$ is obtained leveraging the classification accuracy $Acc$ and number of
elements in feature subset $Num$ as follows:

$\small{r_{t}\longleftarrow\begin{cases}Acc(x_{t}),\text{ if
}Acc(x_{t})<Acc(x_{t+1})\\\ Acc(x_{t+1})-Acc(x_{t}),\text{ if
}Acc(x_{t})>Acc(x_{t+1})\\\ \frac{Acc(x_{t})}{2},\text{ if
}Num(x_{t})>Num(x_{t+1})\\\ -\frac{Acc(x_{t})}{2},\text{ if
}Num(x_{t})<Num(x_{t+1})\end{cases}}$ (4)

Trivially the performance boost of the BSO method by incorporating the
Residual Learning algorithm can be justified by the fact that each of the
search agents learns from the previous experiences along with the experiences
from other search agents. Now, in the case of the BSO algorithm, there are
possibilities that one of the search agents get stuck at local minima, and
considering it as the global one, the other agents converge towards that
point. But in the proposed RSO method, as the agents learn from the
experiences of the other search agents, the possibility of reaching the global
minima increases quite significantly.

##  III Experimental Results

The experimentations for this work was performed using Python 3.1 environment
on a PC with Intel Core 7th generation CPU and 4 GB RAM. The RSO algorithm was
used for the selection of optimal feature subset followed by a classification
performance using the feature subset and KNN classifier.

###  III-A Dataset description

To validate the performance of the proposed RSO algorithm, we have used 25
publicly available datasets from UCI machine learning
repository111https://archive.ics.uci.edu/ml/index.php and Knowledge Extraction
based on Evolutionary Learning (KEEL)
repository222https://sci2s.ugr.es/keel/datasets.php. The datasets were
selected while keeping a considerable diversity in the number of feature
attributes, number of instances and number of classes. The summary of the
datasets is shown in Table I.

###  III-B Parameter setting

Parameter tuning has a pivotal role in the superior performance of any
optimization algorithm. Hence, we have experimented with different parameters
of the BSO and Residual Learning algorithm. To select the optimal set of
parameters, the primary motive was to improve the classification accuracy as
well as reducing the execution time. The optimal parameter setting for the
algorithm was set experimentally by making a suitable compromise between these
two conditions. Figure 1 shows the experimental results with different
parameter tuning of the RSO algorithm using $Ionosphere$ dataset. Different
BSO parameters like $Flip$, $MaxIter$, $ChanceMax$, $NumBees$, $LsIter$ were
varied with integral differences from 1 to 10 wheres different RL parameters
like $lr$, $\alpha$, $\beta$ are varied within the interval from 0 to 1 with
an difference of 0.1, shown in Table II.

TABLE II: Optimal parameter setting for the RSO algorithm Algorithm | Parameters | Optimal value
---|---|---
| Flip | 5
| ChanceMax | 5
| MaxIter | 10
| NumBees | 8
BSO | LsIter | 10
| lr | 0.9
| $\alpha$ | 0.2
RL | $\beta$ | 0.1
TABLE III: Comparison of the proposed RSO method with BSO method for feature
selection along with classification performance without any feature selection.
The highlighted results signify the best classification accuracy for the given
setting.

| Without OA | Proposed Method | BSO
---|---|---|---
Dataset | Accuracy | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score |  | Number
---
of
feature
Time(sec) | Accuracy(%) |  Precision | Recall | F1 Score |  | Number
---
of
feature
Time(sec)
Abalone | 19.76 | 17.26 | 17.27 | 16.41 | 21.93 | 18 | 18.88 | 18.32 | 7 | 134 | 20.33 | 13.64 | 13.78 | 13.44 | 8 | 129
Australian | 63.78 | 62.5 |  61.35 | 61.7 | 86.96 | 86.76 | 86.37 | 86.54 | 5 | 127 | 59.42 | 59.21 | 59.29 | 59.20 | 7 | 132
Biodegrade | 81.04 | 79.32 | 79.19 | 79.8 | 84.15 | 86.93 | 85.31 | 86.24 | 13 | 146 |  79.24 | 77.42 | 78.01 | 77.68 | 16 | 141
Breastcancer | 60 | 58.22 | 57.77 | 57.8 | 97.14 | 97.67 | 96.55 | 97.02 | 4 | 121 | 95.71 | 96.93 | 93.75 | 95.08 | 4 | 120
Breastcancer Wisconcin | 87.71 |  87.86 | 84.79 | 85.99 | 95.16 | 95.29 | 95.29 | 95.29 | 11 | 139 | 87.71 | 87.46 | 86.89 | 87.14 | 10 | 135
Chess | 51.27 | 49.64 | 46.72 | 45.29 | 51.27 | 49.64 | 46.72 | 45.29 | 6 |  95 | 20.20 | 17.52 | 16.29 | 16.28 | 7 | 100
Diabetes | 66.23 | 61.62 | 60.36 | 60.65 | 72.72 | 69.58 | 68.73 | 69.11 | 4 | 126 | 72.72 | 70.91 | 70.61 | 70.75 | 4 | 124
Glass |  74.41 | 70.83 | 67.59 | 64.37 | 85 | 88.69 | 90.28 | 87.95 | 7 | 133 | 54.54 | 46.66 | 43.61 | 44.8 | 8 | 130
Heart-C | 42.62 | 31.73 | 29.11 | 28.98 | 58.39 | 59.66 | 53.4 | 55.62 |  2 | 130 | 54.83 | 24.98 | 30 | 26.58 | 4 | 129
Hepaitits | 60 | 58.92 | 60 | 58.33 | 78.67 | 75.96 | 72.33 | 74.25 | 7 | 135 | 53.33 | 50 | 50 | 49.76 | 6 | 138
Ionosphere | 85.71 | 87.07 | 84.86 | 85.28 | 96.72 | 91.66 | 91.18 | 91.31 | 15 | 138 | 88.96 | 92 | 86.66 | 87.95 | 20 | 142
Iris | 93.33 | 94.44 | 93.33 | 93.27 | 97.85 | 99.23 | 96.19 |  97.33 | 2 | 105 | 86.64 | 86.11 | 86.11 | 86.11 | 2 | 101
LSVT | 46.15 | 54.17 | 54.17 | 46.15 | 75.38 | 74.67 | 77.81 | 76.5 | 213 | 172 | 53.84 | 54.76 | 55 | 53.57 | 224 |  169
LungCancer | 75.64 | 83.33 | 75 | 73.33 | 98.53 | 97.5 | 96.91 | 97.08 | 20 | 157 | 50 | 25 | 50 | 33.33 | 21 | 158
Parkinson | 85 | 81.45 | 81.88 | 79.02 | 93.5 | 86.3 |  85.79 | 85.96 | 12 | 135 | 95 | 90 | 96.8 | 92.83 | 16 | 136
Sonar | 78.57 | 78.6 | 78.41 | 78.56 | 98.31 | 96.63 | 96.23 | 96.22 | 30 | 160 | 85.71 | 86.05 | 84.72 | 85.17 |  42 | 157
Thyroid | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 5 | 104 | 90.93 | 86.92 | 86.92 | 86.92 | 5 | 99
Wine | 60.51 | 55.36 | 52.89 | 53.44 | 97.22 |  97.41 | 97.22 | 97.22 | 9 | 124 | 100 | 100 | 100 | 100 | 10 | 120
Zoo | 95 | 77.77 | 83.33 | 80 | 100 | 95 | 96.67 | 96.67 | 11 | 122 | 100 | 100 | 100 |  100 | 11 | 125
WDBC | 77.19 | 75 | 75.54 | 76.24 | 95.32 | 94.75 | 94.75 | 94.75 | 14 | 135 | 94.73 | 95.94 | 93.47 | 94.39 | 14 | 130
Congress | 93.18 | 93.37 | 92.73 | 93 |  97.95 | 96.54 | 96.28 | 96.25 | 6 | 127 | 95.45 | 93.75 | 96.66 | 94.94 | 9 | 132
Vowel | 98.89 | 98.94 | 98.79 | 98.89 | 100 | 100 | 100 | 100 | 9 | 126 | 98.90 | 99.16 |  99.16 | 99.13 | 9 | 126
MovementLibras | 86.11 | 87.56 | 87.17 | 86.71 | 83.33 | 86.42 | 83.33 | 83.52 | 22 | 161 | 80.55 | 80.35 | 80.71 | 77.09 | 25 | 164
Liver | 62.23 | 61.79 | 60.33 |  60.98 | 64.86 | 63.24 | 65.51 | 62.03 | 4 | 120 | 62.34 | 61.22 | 63.59 | 64.55 | 5 | 114
Spect | 51.25 | 50.23 | 50.02 | 53.66 | 77.47 | 76.33 | 75.89 | 76.32 | 16 | 129 | 72.01 |  70.22 | 73.69 | 70.66 | 14 | 128

TABLE IV: Comparison of the proposed RSO method with different existing
feature selection methods for feature selection along with classification
performance without any feature selection. The highlighted results signify the
best classification accuracy for the given setting.

| Proposed method | PSO | MVO | GWO | MFO | WOA | HHO
---|---|---|---|---|---|---|---
Dataset | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score | Accuracy(%) | Precision | Recall | F1 Score
Abalone | 21.93 | 18 | 18.88 | 18.32 | 20.81 | 15.20 | 15.69 | 15.05 | 21.77 | 12.3 | 12.89 | 12.48 | 19.37 | 10.95 | 11.48 | 11.07 | 21.77 | 12.37 | 12.89 | 12.48 | 21.77 | 12.37 | 12.89 | 12.48 | 21.77 | 12.37 | 12.89 | 12.48
Australian | 86.96 | 86.76 | 86.37 | 86.54 | 79.71 | 79.78 | 80.09 | 79.67 | 86.95 | 86.78 | 86.96 | 86.85 | 59.42 | 58.83 | 58.70 | 58.71 | 60.86 | 60.79 | 60.90 | 60.73 | 49.27 | 63.43 | 53.65 | 40.88 | 86.95 | 87.32 | 86.37 | 86.67
Biodegrade | 84.15 | 86.93 | 85.31 | 86.24 | 80.18 | 78.44 | 79.33 | 78.81 | 81.13 | 79.46 | 80.65 | 79.92 | 83.01 | 81.54 | 81.54 | 81.54 | 81.13 | 79.48 | 79.48 | 79.48 | 75.47 | 73.33 | 72.75 | 73.01 | 82.07 | 80.86 | 83.12 | 81.34
Breastcancer | 97.14 | 97.67 | 96.55 | 97.02 | 92.85 | 93.53 | 90.57 | 91.81 | 92.85 | 93.53 | 90.57 | 91.81 | 95.71 | 96.93 | 93.75 | 95.08 | 95.71 | 96.93 | 93.75 | 95.08 | 94.28 | 94.60 | 92.66 | 93.52 | 92.85 | 93.53 | 90.57 | 91.81
Breastcancer Wisconcin | 95.16 | 95.29 | 95.29 | 95.29 | 89.47 | 89.06 | 89.06 | 89.06 | 89.47 | 89.68 | 88.36 | 88.89 | 87.71 | 87.12 | 87.59 | 87.32 | 89.47 | 89.68 | 88.36 | 88.89 | 94.73 | 94.87 | 94.18 | 94.49 | 94.73 | 94.87 | 94.18 | 94.49
Chess | 51.27 | 49.64 | 46.72 | 45.29 | 34.06 | 34.64 | 40.60 | 35.54 | 49.46 | 46.64 | 51.45 | 47.93 | 47.46 | 30.14 | 29.81 | 29.91 | 49.46 | 46.64 | 51.45 | 47.93 | 49.46 | 46.64 | 51.45 | 47.93 | 49.46 | 46.64 | 51.45 | 47.93
Diabetes | 72.72 | 69.58 | 68.73 | 69.11 | 76.62 | 75.32 | 77.15 | 75.93 | 76.62 | 75.71 | 77.15 | 75.93 | 76.62 | 75.71 | 77.15 | 75.93 | 75.32 | 74.21 | 75.43 | 74.48 | 76.62 | 75.71 | 77.15 | 75.93 | 72.72 | 70.91 | 70.61 | 70.75
Glass | 85 | 88.69 | 90.28 | 87.95 | 59.09 | 52.77 | 50.27 | 51.11 | 59.09 | 52 | 45.83 | 48.01 | 54.54 | 47.77 | 43.61 | 45.39 | 59.09 | 52 | 45.83 | 48.01 | 54.54 | 46.66 | 43.61 | 44.81 | 54.54 | 45 | 43.88 | 44.41
Heart-C | 58.39 | 59.66 | 53.4 | 55.62 | 32.25 | 16.85 | 16.66 | 16.25 | 51.61 | 24.28 | 20.66 | 21.09 | 45.16 | 15.55 | 15.55 | 15.55 | 51.61 | 28.88 | 31.77 | 26.82 | 51.61 | 21.64 | 23.33 | 22.14 | 48.38 | 35 | 34 | 33.56
Hepaitits | 78.67 | 75.96 | 72.33 | 74.25 | 60 | 60.71 | 61.11 | 59.82 | 80 | 80 | 77.77 | 78.46 | 60 | 58.33 | 58.33 | 58.33 | 66.66 | 69.44 | 69.44 | 66.66 | 46.66 | 47.32 | 47.22 | 46.42 | 46.66 | 44.44 | 44.44 | 44.44
Ionosphere | 96.72 | 91.66 | 91.18 | 91.31 | 77.77 | 86.20 | 73.33 | 73.81 | 77.77 | 86.20 | 73.33 | 73.81 | 75 | 79.46 | 70.95 | 71.25 | 77.77 | 86.20 | 73.33 | 73.81 | 77.78 | 86.20 | 73.33 | 73.81 | 75 | 85 | 70 | 69.74
Iris | 97.85 | 99.23 | 96.19 | 97.33 | 100 | 100 | 100 | 100 |  100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100
LSVT | 75.38 | 74.67 | 77.81 | 76.5 | 69.23 | 70.23 | 71.25 | 69.04 | 69.23 | 70.23 | 71.25 | 69.04 | 69.23 | 70.23 | 71.25 | 69.04 | 61.53 | 60.71 | 61.25 | 60.60 | 69.23 | 70.23 | 71.25 | 69.04 | 61.53 | 60.71 | 61.25 | 60.60
LungCancer | 98.53 | 97.5 | 96.91 | 97.08 | 50 | 50 | 50 | 50 | 75 | 83.33 | 75 | 73.33 | 50 | 50 | 50 | 50 | 50 | 25 | 50 | 33.33 | 50 | 50 | 50 | 50 | 50 | 25 | 50 | 33.33
Parkinson | 93.5 | 86.3 | 85.79 | 85.96 | 75 | 67.58 | 75 | 68.6 | 95 | 90 | 96.87 | 92.83 | 95 | 90 | 96.87 | 92.83 | 95 | 90 | 96.87 | 92.83 | 95 | 90 | 96.87 | 92.83 | 95 | 90 | 96.87 | 92.83
Sonar | 98.31 | 96.63 | 96.23 | 96.22 | 76.19 | 78.33 | 73.61 | 74.07 | 66.66 | 66.66 | 63.88 | 63.70 |  100 | 100 | 100 | 100 | 90.47 | 90.27 | 90.27 | 90.27 | 76.19 | 78.33 | 73.61 | 74.07 | 71.42 | 74.37 | 68.05 | 67.85
Thyroid | 100 | 100 | 100 | 100 | 90.90 | 86.92 | 86.92 | 86.92 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100
Wine | 97.22 | 97.41 | 97.22 | 97.22 | 66.66 | 62.5 | 60.71 | 61.32 | 94.44 | 95.83 | 95.23 | 95.21 |  100 | 100 | 100 | 100 | 94.44 | 93.33 | 95.23 | 93.73 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100
Zoo | 100 | 95 | 96.67 | 96.67 | 100 | 100 | 100 | 100 | 90.90 | 66.66 | 66.66 | 66.66 | 90.90 | 66.66 | 66.66 | 66.66 | 100 | 100 | 100 | 100 | 90.90 | 66.66 | 66.66 | 66.66 | 90.90 | 66.66 | 66.66 | 66.66
WDBC | 95.32 | 94.75 | 94.75 | 94.75 | 87.71 | 89.52 | 85.48 | 86.66 | 87.71 | 87.46 | 86.89 | 87.14 | 78.94 | 78.94 | 76.72 | 77.38 | 89.47 | 89.68 | 88.36 | 88.89 | 84.21 | 83.76 | 83.24 | 83.47 | 91.22 | 92.09 | 89.83 | 90.66
Congress | 97.95 | 96.54 | 96.28 | 96.25 | 90.90 | 88.83 | 91.42 | 89.88 | 90.90 | 88.88 | 93.33 | 90.17 | 95.45 | 93.75 | 96.66 | 94.94 | 97.72 | 96.66 | 98.33 | 97.42 | 97.72 | 96.66 | 98.33 | 97.42 | 90.90 | 88.88 | 93.33 | 90.17
Vowel | 100 | 100 | 100 | 100 | 97.80 | 95.83 | 98.05 | 96.54 | 97.80 | 95.83 | 98.05 | 96.54 | 96.70 | 97.46 | 97.08 | 97.06 | 97.80 | 98.16 | 97.91 | 97.93 | 97.80 | 98.16 | 97.91 | 97.93 | 97.80 | 95.83 | 98.05 | 96.54
MovementLibras | 83.33 | 86.42 | 83.33 | 83.52 | 80.55 | 80.35 | 80.71 | 77.09 | 83.33 | 81.30 | 84.28 | 79.99 | 83.33 | 82.14 | 82.5 | 79.47 | 83.33 | 81.66 | 84.28 | 79.86 | 80.55 | 81.76 | 80.71 | 77.73 | 77.77 | 80.65 | 78.33 | 76.16
Liver | 64.86 | 63.24 | 65.51 | 62.03 | 61.25 | 60.94 | 61.27 | 61.11 | 62.66 | 62.47 | 63.08 | 62.69 | 63.52 | 62.63 | 63.02 | 62.94 | 62.66 | 62.47 | 63.08 | 62.69 | 60.78 | 61.29 | 60.36 | 63.52 | 62.63 | 63.02 | 62.94 | 62.66
Spect |  77.47 | 76.33 | 75.89 | 76.32 | 75.88 | 76.36 | 76.55 | 76.48 | 75.88 | 76.36 | 76.55 | 76.48 | 75.88 | 76.36 | 76.55 | 76.48 | 76.15 | 75.89 | 76.32 | 76.06 | 75 | 75 | 75 | 75 | 75.88 | 76.36 | 76.55 | 76.48

Figure 1: Analysis of classification accuracy and execution time vs. different
parameters of the RSO algorithm

###  III-C Performance evaluation

The performance of the proposed method was evaluated on 25 standard datasets
where we have selected optimal feature subset using RSO followed by
classification using KNN classifier. The classification performance was
evaluated using the evaluation metrics given by Equation 5-8.

$Accuracy=\frac{TP+TN}{TP+TN+FP+FN}$ (5) $Precision=\frac{TP}{TP+FP}$ (6)
$Recall=\frac{TP}{TP+FN}$ (7)
$F1score=\frac{2}{\frac{1}{Precision}+\frac{1}{Recall}}$ (8)

where $TP$ = True Positive, $FP$ = False Positive, $TN$ = True Negative, and
$FN$ = False Negative.

###  III-D Comparison with existing methods

We have evaluated the performance of the proposed RSO method with different
existing optimization algorithms. Table III shows the comparison of the
experimental results in terms of accuracy, precision, recall, F1 score,
execution time, and the number of selected features, obtained from our
proposed method with the same obtained from the BSO algorithm.It is evident
from the table that our proposed RSO method outperforms the BSO algorithm in
22 out of the 25 cases in terms of classification accuracy, by using a
significantly smaller subset of feature data and thereby reducing the
execution time.

We have also compared the obtained results with several feature selection
algorithms like Particle Swarm Optimization (PSO) [2], Grey Wolf Optimization
(GWO) [3], Genetic Algorithm (GA) [4], Harris Hawk Optimization (HHO) [29],
Multi-Verse Optimization (MVO) [30], Moth Flame Optimization [31], Whale
Optimization Algorithm (WOA) [32] as shown in Table IV. The proposed method
outperformed all the methods compared in this paper in 19 out of 25 cases in
terms of fitness of selected features, which is reflected in classification
accuracy. However, our model performed inferior in the case of $Wine$ dataset
with the best classification accuracy of 97.22% whereas most of the other
methods were able to produce a superior feature subset, resulting in a
classification accuracy of 100%. In the case of $Diabetes$ dataset, PSO, MVO,
WOA and GWO performed the best with a classification accuracy of 76.62% as
compared to 72.72% from the proposed RSO method. The MVO method performed the
best in $Hepatitis$ dataset as compared to 78.67% from our proposed method.
For $Iris$ dataset, all the methods produced a classification accuracy of 100%
whereas the RSO method produced a result of 97.85%. MVO, MFO, WOA, and HHO
produced similar results to the BSO method in $Parkinson$ dataset with a
classification accuracy of 95% as compared to 93.5% of our proposed method. In
the case of $Sonar$ data, the GWO performs the best with a classification
accuracy of 100% as compared to 98.31% from RSO. Our proposed method performs
the best in all other datasets as shown in Table IV.

##  IV Conclusion and future work

In this paper, we propose a new hybrid wrapper-based feature selection
algorithm named RSO, which integrates the Residual Learning algorithm with the
metaheuristic BSO algorithm. Experimental results show that our proposed
method outperforms the BSO as well as the existing and popularly known
metaheuristic optimization algorithms in feature selection task in terms of
accuracy by selecting comparatively fewer optimal features. In future, we plan
to extend our research by experimenting and observing the performance of
different hybrid optimization algorithms. We also plan to observe the
performance of RSO on deep features, to study the impact of RL in the
performance of feature selection algorithms.

## References

  * [1] A. L. Blum and P. Langley, “Selection of relevant features and examples in machine learning,” _Artificial intelligence_ , vol. 97, no. 1-2, pp. 245–271, 1997.
  * [2] R. Eberhart and J. Kennedy, “A new optimizer using particle swarm theory,” in _MHS’95. Proceedings of the Sixth International Symposium on Micro Machine and Human Science_. Ieee, 1995, pp. 39–43.
  * [3] S. Mirjalili, S. M. Mirjalili, and A. Lewis, “Grey wolf optimizer,” _Advances in engineering software_ , vol. 69, pp. 46–61, 2014.
  * [4] J. R. Schott, “Fault tolerant design using single and multicriteria genetic algorithm optimization,” Ph.D. dissertation, Massachusetts Institute of Technology, 1995.
  * [5] D. Karaboga, “An idea based on honey bee swarm for numerical optimization,” Citeseer, Tech. Rep., 2005.
  * [6] A. Bommert, X. Sun, B. Bischl, J. Rahnenführer, and M. Lang, “Benchmark for filter methods for feature selection in high-dimensional classification data,” _Computational Statistics & Data Analysis_, vol. 143, p. 106839, 2020.
  * [7] R. J. S. Raj, S. J. Shobana, I. V. Pustokhina, D. A. Pustokhin, D. Gupta, and K. Shankar, “Optimal feature selection-based medical image classification using deep learning model in internet of medical things,” _IEEE Access_ , vol. 8, pp. 58 006–58 017, 2020.
  * [8] P. Hu, J.-S. Pan, and S.-C. Chu, “Improved binary grey wolf optimizer and its application for feature selection,” _Knowledge-Based Systems_ , vol. 195, p. 105746, 2020.
  * [9] X. Zhang, M. Fan, D. Wang, P. Zhou, and D. Tao, “Top-k feature selection framework using robust 0-1 integer programming,” _IEEE Transactions on Neural Networks and Learning Systems_ , 2020.
  * [10] L. Ke, Z. Feng, and Z. Ren, “An efficient ant colony optimization approach to attribute reduction in rough set theory,” _Pattern Recognition Letters_ , vol. 29, no. 9, pp. 1351–1357, 2008.
  * [11] O. Engin and A. Güçlü, “A new hybrid ant colony optimization algorithm for solving the no-wait flow shop scheduling problems,” _Applied Soft Computing_ , vol. 72, pp. 166–176, 2018.
  * [12] M. Amoozegar and B. Minaei-Bidgoli, “Optimizing multi-objective pso based feature selection method using a feature elitism mechanism,” _Expert Systems with Applications_ , vol. 113, pp. 499–514, 2018.
  * [13] Y. Zhang, D.-w. Gong, X.-y. Sun, and Y.-n. Guo, “A pso-based multi-objective multi-label feature selection method in classification,” _Scientific reports_ , vol. 7, no. 1, pp. 1–12, 2017.
  * [14] C. Yan, J. Ma, H. Luo, and A. Patel, “Hybrid binary coral reefs optimization algorithm with simulated annealing for feature selection in high-dimensional biomedical datasets,” _Chemometrics and Intelligent Laboratory Systems_ , vol. 184, pp. 102–111, 2019.
  * [15] M. M. Mafarja and S. Mirjalili, “Hybrid whale optimization algorithm with simulated annealing for feature selection,” _Neurocomputing_ , vol. 260, pp. 302–312, 2017.
  * [16] M. M. Kabir, M. Shahjahan, and K. Murase, “A new hybrid ant colony optimization algorithm for feature selection,” _Expert Systems with Applications_ , vol. 39, no. 3, pp. 3747–3763, 2012.
  * [17] S. Chattopadhyay, A. Dey, and H. Basak, “Optimizing speech emotion recognition using manta-ray based feature selection,” _arXiv preprint arXiv:2009.08909_ , 2020.
  * [18] J. Meshkati and F. Safi-Esfahani, “Energy-aware resource utilization based on particle swarm optimization and artificial bee colony algorithms in cloud computing,” _The Journal of Supercomputing_ , vol. 75, no. 5, pp. 2455–2496, 2019.
  * [19] Y. Djenouri, Z. Habbas, D. Djenouri, and P. Fournier-Viger, “Bee swarm optimization for solving the maxsat problem using prior knowledge,” _Soft Computing_ , vol. 23, no. 9, pp. 3095–3112, 2019.
  * [20] Y. Djenouri, A. Belhadi, and R. Belkebir, “Bees swarm optimization guided by data mining techniques for document information retrieval,” _Expert Systems with Applications_ , vol. 94, pp. 126–136, 2018.
  * [21] Y. Djenouri, D. Djenouri, A. Belhadi, P. Fournier-Viger, J. C.-W. Lin, and A. Bendjoudi, “Exploiting gpu parallelism in improving bees swarm optimization for mining big transactional databases,” _Information Sciences_ , vol. 496, pp. 326–342, 2019.
  * [22] L. Gao, M. Ye, and C. Wu, “Cancer classification based on support vector machine optimized by particle swarm optimization and artificial bee colony,” _Molecules_ , vol. 22, no. 12, p. 2086, 2017.
  * [23] H. Basak, R. Kundu, S. Chakraborty, and N. Das, “Cervical cytology classification using pca & gwo enhanced deep features selection,” _arXiv preprint arXiv:2106.04919_ , 2021.
  * [24] D. Teodorovic, P. Lucic, G. Markovic, and M. Dell’Orco, “Bee colony optimization: principles and applications,” in _2006 8th Seminar on Neural Network Applications in Electrical Engineering_. IEEE, 2006, pp. 151–156.
  * [25] L. P. Kaelbling, M. L. Littman, and A. W. Moore, “Reinforcement learning: A survey,” _Journal of artificial intelligence research_ , vol. 4, pp. 237–285, 1996.
  * [26] N. Metropolis and S. Ulam, “The monte carlo method,” _Journal of the American statistical association_ , vol. 44, no. 247, pp. 335–341, 1949.
  * [27] H. Song, C.-C. Liu, J. Lawarrée, and R. W. Dahlgren, “Optimal electricity supply bidding by markov decision process,” _IEEE transactions on power systems_ , vol. 15, no. 2, pp. 618–624, 2000.
  * [28] G. Tesauro, “Temporal difference learning and td-gammon,” _Communications of the ACM_ , vol. 38, no. 3, pp. 58–68, 1995.
  * [29] A. A. Heidari, S. Mirjalili, H. Faris, I. Aljarah, M. Mafarja, and H. Chen, “Harris hawks optimization: Algorithm and applications,” _Future generation computer systems_ , vol. 97, pp. 849–872, 2019.
  * [30] S. Mirjalili, S. M. Mirjalili, and A. Hatamlou, “Multi-verse optimizer: a nature-inspired algorithm for global optimization,” _Neural Computing and Applications_ , vol. 27, no. 2, pp. 495–513, 2016.
  * [31] S. Mirjalili, “Moth-flame optimization algorithm: A novel nature-inspired heuristic paradigm,” _Knowledge-based systems_ , vol. 89, pp. 228–249, 2015\.
  * [32] S. Mirjalili and A. Lewis, “The whale optimization algorithm,” _Advances in engineering software_ , vol. 95, pp. 51–67, 2016.


# Entropy production and fluctuation theorems in a continuously monitored
optical cavity at zero temperature

M. J. Kewming  School of Physics, Trinity College Dublin, College Green,
Dublin 2, Ireland<EMAIL_ADDRESS>S. Shrapnel  Centre for Engineered Quantum
Systems, School of Mathematics and Physics, University of Queensland, QLD 4072
Australia

###### Abstract

Fluctuation theorems allow one to make generalised statements about the
behaviour of thermodynamic quantities in systems that are driven far from
thermal equilibrium. In this article we use Crooks’ fluctuation theorem to
understand the entropy production of a continuously measured, zero temperature
quantum system; namely an optical cavity measured via homodyne detection. At
zero temperature, if one uses the classical definition of inverse temperature
$\beta$, then the entropy production becomes divergent. Our analysis shows
that the entropy production can be well defined at zero temperature by
considering the entropy produced in the measurement record leading to an
effective inverse temperature $\beta_{\rm eff}$ which does not diverge. We
link this result to the Cramér-Rao inequality and show that the product of the
Fisher information of the work distribution with the entropy production is
bounded below by half of the square of the effective inverse temperature
$\beta_{\rm eff}$. This inequality indicates that there is a minimal amount of
entropy production that is paid to acquire information about the work done to
a quantum system driven far from equilibrium.

##  1 Introduction

The laws of thermodynamics provide a tremendously useful set of scientific
tools. They tell us which natural physical processes are possible, show us
that our machines have efficiency limits, and arguably form a basis for our
understanding of the arrow of time. In the preceding decades the scope of
thermodynamics has enlarged to include nonequilibrium systems, quantum
systems, and cosmological systems such as black holes. Thermodynamics is a
truly universal theory. In particular, quantum thermodynamics is a rapidly
evolving discipline bringing together concepts from quantum information, many-
body physics, and nonequilibrium thermodynamics [1, 2].

For small thermalising systems with few interacting degrees of freedom,
fluctuations will dominate and the thermodynamic quantities must be
characterised by stochastic random variables [3]. Investigations into these
fluctuations has established a new understanding regarding constraints on
entropy production and the second law of thermodynamics [4, 5, 6, 7]. These
seminal results, which are now colloquially known as fluctuation theorems
(FTs), have established a remarkable insight; fluctuations in microscopic
systems that are comparable in scale to the system have a specific
mathematical structure determined entirely by the entropy production $\Sigma$
[8]. Thus classical FTs have significant implications for understanding energy
exchange in biology, nano-engineering, computation and communications.

Another pertinent line of research stemming from this body of work is the
emerging field of quantum stochastic thermodynamics (QST) [9, 10]. Quantum
systems are unique in the sense that the measurement process is intrinsically
connected to their stochastic behaviour [11, 12, 13]. In QST, researchers seek
to understand the nature of heat $Q$, work $W$, and entropy production
$\Sigma$, and their associated probability
distributions—$P(W),P(Q),P(\Sigma)$—when subject to continuous measurement. A
natural question to ask is whether continuously measured quantum systems
satisfy the classical FTs, or whether these theorems need to be modified in
accordance with experimental findings. Given the stochastic nature of quantum
measurement, it is interesting to consider how FTs could be incorporated into
the frameworks of open and closed quantum systems [14, 15, 16, 17, 18, 19, 20,
21]. Seminal results have shown that quantum measurements produce entropy [22,
23, 24, 25, 26, 27, 28], and that perfect measurements cannot be performed on
quantum systems using finite resources [29]. Further work has shown that
measurement can be utilised as a resource in quantum engines for information,
work extraction, and battery charging [30, 31, 32, 33]. Importantly, the
fluctuations induced by the measurement process satisfy several thermodynamic
uncertainty relations (TURs) [34, 19] which impose strict restrictions on the
fluctuations of thermodynamic current [35, 36, 37]. This is particularly
important when considering the limitations of precision from quantum
measurement [38] and quantum or classical feedback [39, 40, 41, 42, 43, 44,
45]. For a recent comprehensive review of stochastic quantum thermodynamics
for continuously measured systems, please see [46].

Despite this growing body of work, it is not yet clear how to extend FTs to
the zero temperature setting, $T{\rightarrow}0$, where the inverse temperature
$\beta{=}1/k_{B}T$ diverges. One could argue that the zero temperature limit
is unphysical—citing, for example, the third law of thermodynamics, or showing
that this limit requires infinite resources or infinite time [47]. Despite
this argument, the zero temperature limit is nonetheless a very good
approximation for optical cavities, and is of significant practical utility in
theoretical modelling of quantum optical systems. As such, it is important to
understand how entropy production can extended to the zero temperature limit,
particularly for quantum systems undergoing continuous measurement.

One proposed solution is to use the Wigner entropy, which relates $\beta$ to
the zero point energy, ensuring $\Sigma$ remains well defined at zero
temperature [48, 27]. Wigner entropy is defined in terms of a quasi-
probability distribution over phase-space, and for pure states can be non-zero
[49]). Interestingly, Wigner entropy has been shown to satisfy an integral
fluctuation theorem, thus extending its application to stochastic systems
driven far from equilibrium. However, what is lacking from the Wigner entropy
description is its relationship to stochastic fluctuations arising in the
measurement record from continuous measurement, as is typically described in
QST.

In this paper we take a new approach and show that both entropy production,
$\Sigma$, and FTs can be well defined for continuously measured quantum
systems at zero temperature by considering the entropy of the measurement
record. This is done in the context of a single mode optical cavity, driven
from an initial vacuum state to a nonequilibrium steady-state, and monitored
continuously via homodyne detection (similar to the models considered in [22,
48, 27]). Assuming that the optical cavity is driven from an initial thermal
equilibrium state to a non-equilibrium steady-state, then $\Sigma$ is related
to the difference between work done $W$ during the process and the Helmholtz
free energy of the system $\Delta F$ [5]:

$\Sigma=\beta(W-\Delta F).$ (1)

We show that if one defines $\Sigma$ using the classical Shannon entropy of
the measurement record used to infer the _estimated_ work $W$, then to satisfy
Eq. (1), one must define an _effective_ inverse temperature,
$\beta_{\mathrm{eff}}$, which is determined by the measurement efficiency
$\eta$, the mean photon number of the cavity $\overline{n}$, and the average
energy in the zero temperature bath. We further show that this definition
produces results that agree with those derived using Wigner entropy [48, 27].
Interestingly, while $\beta_{\mathrm{eff}}$ differs from the classical inverse
temperature, it agrees in the high-temperature limit when one has access to
perfect measurements, corresponding to $\beta_{\mathrm{eff}}\rightarrow
1/k_{B}T$.

As a final consideration in this article, we seek to understand the
relationship between the entropy production $\Sigma$ and what we can infer
about the average work from the measured signal. A natural information measure
to consider is the classical Fisher information (FI) of the average measured
work $I(W)$. We compute the FI from the observed work statistics and relate it
to the average entropy produced $\Sigma$. We derive an inequality that bounds
the product of $\Sigma$ and the $I(W)$ below by half the effective temperature
squared $\beta_{\rm eff}^{2}/2$. Thus, for a given FI, only a given region of
possible $\Sigma$ values are permitted. This highlights the direct trade-off
between information gain and entropy production in such continuously measured
systems.

##  2 System Dynamics and Thermodynamics

We begin by considering a single mode cavity, with frequency $\omega$ and
annihilation (creation) operators $\hat{a}\,(\hat{a}^{\dagger})$. The cavity
is coherently driven by an AC driving field, on resonance with a pump-
frequency $\omega$ along the phase quadrature $\hat{q}$, with a maximum
amplitude $g$. The Hamiltonian describing this cavity system is

$\hat{H}(t)=\hbar\omega\hat{a}^{\dagger}\hat{a}+g\sin(\omega
t)\lambda(t)\hat{q}\,,$ (2)

where the single mode phase quadratures are
$\hat{q}{=}\sqrt{\hbar/2\omega}(\hat{a}+\hat{a}^{\dagger})$ and
$\hat{p}{=}i\sqrt{\hbar\omega/2}(\hat{a}-\hat{a}^{\dagger})$, and satisfy
$\left[\hat{q},\hat{p}\right]=i\hbar$. The $\sin(\omega t)$ term ensures that
our optical field will physically couple to our cavity on resonance. The power
of the drive is time dependent $\lambda(t)$; initially equal to zero
$\lambda(0){=}0$ (i.e. the drive is turned off) and then ramps up to
$\lambda(\tau){=}1$ (the drive is turned on). Unsurprisingly, when the drive
is on $\lambda(t)\neq 0$, the AC drive does work $W$ on the internal cavity
state $\hat{\rho}$ due to the continuous oscillatory term.

We will further assume that our system is weakly coupled to a thermal
reservoir of Bosons which evolves under the Born-Markov assumption. The
strength of this coupling is $\gamma$. We characterise the mean photon number
of the bath via the Bose-Einstein distribution
${\overline{n}{=}(\exp(\mu)-1)^{-1}}$, where $\mu{=}\hbar\omega/k_{B}T$.
Notably $\overline{n}$ will approach zero when $T{\rightarrow}0$ indicating
the environment is a vacuum. We can describe the evolution of the internal
cavity state via the local Lindblad master equation, which in the Schrödinger
picture

$\displaystyle\frac{d\hat{\rho}}{dt}$
$\displaystyle=-\frac{i}{\hbar}[\hat{H}(t),\hat{\rho}]+\gamma_{-}\mathcal{D}[\hat{a}]\hat{\rho}+\gamma_{+}\mathcal{D}[\hat{a}^{\dagger}]\hat{\rho}\,,$
(3)

where we have
$\mathcal{D}[\hat{a}]\hat{\rho}{=\hat{a}\hat{\rho}\hat{a}^{\dagger}-(\hat{a}^{\dagger}\hat{\rho}+\hat{\rho}\hat{a}^{\dagger})/2}$
as the standard Lindblad dissipator, and $\gamma_{-}{=\gamma(\overline{n}+1)}$
and $\gamma_{+}{=}\gamma\overline{n}$ are the emission/absorption rates
respectively. Initially, the internal cavity state is described by a thermal
Gibbs state $\hat{\rho}_{i}{=}e^{-\mu\hat{a}^{\dagger}\hat{a}}/\mathcal{Z}$
where $\mathcal{Z}{=}\mathrm{tr}(e^{-\mu\hat{a}^{\dagger}\hat{a}})$ is the
Partition function.

From the perspective of quantum thermodynamics and the local Lindlad master
equation, the average power $\langle dW\rangle$ from the drive in the weak
coupling limit is [2]

$\langle dW\rangle=\left<\frac{\partial\hat{H}(t)}{\partial t}\right>\approx
g\omega\lambda(t)\langle\hat{q}(t)\rangle\,,$ (4)

where we have only included the dominant term proportional to $\omega$. The
average work done over the time $t\in(0,\tau]$ is given by the integral
$\langle W\rangle=\int_{0}^{\tau}\langle dW\rangle dt$. If we substitute the
Hamiltonian Eq. (2) into this expression, and transform into the interaction
picture under the rotating wave approximation, we obtain an expression for the
average work

$\langle
W\rangle=g\omega\int_{0}^{\tau}dt\lambda(t)\langle\hat{q}(t)\rangle\,.$ (5)

Thus we can directly infer $W$ by measuring the evolution in $\hat{q}$ in this
frame.

Figure 1: (Top) The Wigner function for the initial and final states. The
initial state is a thermal state centred at the origin, whereas the final
state corresponds to a displaced thermal state. (Bottom) If we plot the power
$\langle dW\rangle$ against the dissipated heat $\langle dQ\rangle$ for the
forward (Red) and reverse (Green) paths. When the path intersects the black
dashed line, the system is in a steady-state. At the origin, this corresponds
to the equilibrium steady-state, where all other cases when $\langle
dW\rangle=-\langle dQ\rangle\neq 0$ correspond to NESS. The simulation
parameters are $\overline{n}=1$, $\gamma=2$, and $g=1$. Here we will assume
the power ramp of the drive $\lambda(t)=(\exp(-\sigma(t-t_{0})+1)^{-1}$
follows a sigmoid profile where $\sigma$ controls the steepness of the ramp
and $t_{0}=\tau/2$ corresponds the centre of the ramp.

The dynamics in this picture are therefore quite straightforward; the system
is initially in a Gibbs state, centred at the origin of phase space which is
then driven over a period of time $\tau$, to a displaced Gibbs state—in the
rotating frame with $\lambda(t){=}1$— with a mean steady-state displacement
$\langle\hat{q}\rangle_{ss}=2g/\omega\gamma$ as depicted in Figure 1. This
displaced thermal state corresponds to a nonequilibrium steady-state (NESS)
given that the average power added $\langle dW\rangle$ is equal the average
dissipated heat current $\langle dQ\rangle$—in this case, due to photons
leaking out of the cavity per unit time and is computed via

$\langle
dQ\rangle=\frac{d\langle\hat{H}(t)\rangle}{dt}\approx\hbar\omega\gamma(\overline{n}-\langle\hat{n}\rangle)\,,$
(6)

again where we have only included the dominant term proportional to $\omega$.
This means that the average change in internal energy $\langle
dU\rangle=\langle dW\rangle+\langle dQ\rangle$, is zero. Thus the non
equilibrium steady-state occurs when $\langle dW\rangle=-\langle dQ\rangle$.
If we plot these two processes against one another, we can easily see where
the steady-states emerge and the energy cycle traced out by this system in
Figure 1.

Lastly, we can compute the change in Helmholtz free energy $\Delta F$, which
is defined as the difference between the change in internal energy $\Delta U$
and the change in the Von-Neumann entropy in the system $\Delta S$

$\Delta F=\Delta U-T\Delta S\,,$ (7)

where $T$ is the temperature system. It is easy to show that the $\Delta
S{=}0$ since $\hat{\rho}_{i}$ and $\hat{\rho}_{f}$ are both thermal, and
displaced thermal states respectively. Therefore one can readily show that the
change in Helmholtz free energy between $\lambda(0)=0$ and $\lambda(\tau)=1$
as

$\Delta
F=-\hbar\omega\left(\langle\hat{n}\rangle_{f}-\langle\hat{n}\rangle_{0}\right)=-\frac{2\hbar\omega
g^{2}}{\gamma^{2}}\,,$ (8)

where $\langle\hat{n}\rangle_{0}$ is the initial and
$\langle\hat{n}\rangle_{f}$ the final mean photon numbers in the cavity. Thus
$\Delta F$ of the cavity corresponds to the change in photon occupation of the
cavity, as we would expect.

Figure 2: a) Here we consider a cavity with frequency $\omega$ that is
coherently driven by a time-dependent field $\hat{H}(t)$ (green photons). The
cavity is incoherently coupled to a thermal bath with mean photon number
$\overline{n}$ and decay rate $\gamma$ (red photons). The thermal bath and the
LO lead to white noise appearing at the measurement detector [13]. b) The
evolution of $X$ for the forward (red) and backward (green) simulation. The
simulation parameters are the same as those used in Figure 1. The solid
corresponds to the average path taken corresponding to
$\mathrm{E}[X]=\langle\hat{q}(t)\rangle$ and computed by the unconditional
master equation. The opaque lines are a samples of estimate $X$ derived from
the filtered homodyne current $J_{\mathrm{hom}}(t)$. Here we have used the
same ramp $\lambda(t)$ used in Figure 1 and is depicted as the black dashed
line.

##  3 Stochastic Quantum Thermodynamics and Measurements

Now that we have described the dynamics and energetics of the system, we can
turn to the measurement scheme. In this example, we can continuously measure
the work done on the system using homodyne detection of the phase quadrature
$\hat{q}$ in Eq. (5). During the evolution of a quantum system, continuous
quantum measurement conditions the evolution of the system $\hat{\rho}_{J}$ on
the measurement outcome—where subscript $J$ indicates that this operator has
been conditioned on the homodyne signal $J_{\mathrm{hom}}(t)$. This stochastic
conditioning is well understood for many continuous measurement protocols,
including homodyne detection [13]. Here the evolution of conditional state
$\hat{\rho}_{J}$ is described by an Itô stochastic master equation with a
white noise input [50, 13]

$\displaystyle d\hat{\rho}_{J}$
$\displaystyle=-\frac{i}{\hbar}[\hat{H}_{I},\hat{\rho}_{J}]dt$
$\displaystyle+\gamma(\overline{n}+1)\mathcal{D}[\hat{a}]\hat{\rho}_{J}dt+\gamma\overline{n}\mathcal{D}[\hat{a}^{\dagger}]\hat{\rho}_{J}dt$
$\displaystyle+\sqrt{\frac{\gamma\eta}{L}}\mathcal{H}[(\overline{n}+1)\hat{a}-\overline{n}\hat{a}^{\dagger}]\hat{\rho}_{J}d\mathcal{W}\,,$
(9)

where $d\mathcal{W}$ is a Wiener Process with $\mathrm{E}[d\mathcal{W}]{=}0$,
$\mathrm{Var}[d\mathcal{W}]{=}dt$, the coefficient $L{=}2\overline{n}+1$, and
the superoperator is
$\mathcal{H}[\hat{a}]\hat{\rho}{=\hat{a}\hat{\rho}+\hat{\rho}\hat{a}^{\dagger}-\mathrm{tr}\left[\hat{a}\hat{\rho}+\hat{\rho}\hat{a}^{\dagger}\right]}$.
The homodyne measurement will provide a constant, albeit, stochastic readout
of the phase quadrature $\langle\hat{q}_{J}\rangle$, which can be used to
infer $\langle W\rangle$ via Eq. (5). We can compute this analytically using
the stochastic Heisenberg equation of motion for $\langle\hat{q}_{J}\rangle$
which is an Itô stochastic differential equation (SDE)

$\displaystyle d\langle\hat{q}_{J}\rangle$
$\displaystyle=\frac{g}{\omega}\lambda(t)dt-\frac{\gamma}{2}\langle\hat{q}_{J}\rangle
dt$ $\displaystyle+\sqrt{\frac{2\gamma\eta\omega}{\hbar
L}}\left(\Delta\hat{q}_{J}^{2}-\frac{\hbar L}{2\omega}\right)d\mathcal{W}\,,$
(10)

where
$\Delta\hat{q}_{J}^{2}=\langle\hat{q}^{2}_{J}\rangle-\langle\hat{q}_{J}\rangle^{2}$
is the conditional variance of $\hat{q}_{J}$ due to the measurement action on
the quantum dynamics. This setup is depicted fully in Figure 2a.

Given that our initial state is a thermal state, and thus a Gaussian state,
the additional stochastic behaviour—which is Gaussian white noise—will
preserve the Gaussian nature of our statistics in $\langle\hat{q}_{J}\rangle$.
As a result, the stochastic dynamics will only depend up to the second order
moment $\Delta\hat{q}_{J}^{2}$ [51]. Making use of Itô’s lemma, we derive the
Heisenberg equation of motion for the variance and we obtain

$\displaystyle d\Delta\hat{q}_{J}^{2}=-\gamma\Delta
q_{J}^{2}dt+\frac{\gamma\hbar L}{2\omega}dt-\frac{2\gamma\eta\omega}{\hbar
L}\left(\Delta\hat{q}_{J}^{2}-\frac{\hbar
L}{2\omega}\right)^{2}dt+\sqrt{\frac{2\gamma\eta\omega}{\hbar
L}}d\mathcal{W}{\rm Skew}[\hat{q}_{J}]\,,$

where ${\rm
Skew}[\hat{q}_{J}]=\left(\langle\hat{q}_{J}^{3}\rangle-3\langle\hat{q}_{J}^{2}\rangle\langle\hat{q}_{J}\rangle+2\langle\hat{q}_{J}\rangle^{3}\right)$
is the third order moment (the skewness) which vanishes for Gaussian states.
Therefore the variance obeys an ordinary differential equation (ODE), which we
can solve given the initial variance $\Delta\hat{q}_{J}^{2}(0)=\hbar
L/2\omega$. For all times, the solution to the variance ODE is

$\Delta\hat{q}_{J}^{2}=\frac{\hbar L}{2\omega}\,.$ (11)

If we now substitute this result into the SDE for $\langle\hat{q}_{J}\rangle$,
the stochastic term also vanishes, permitting the general deterministic
solution to the first moment Eq. (10)

$\langle\hat{q}_{J}\rangle=\frac{g}{\omega}\int_{0}^{\tau}e^{-\gamma(\tau-t)/2}\lambda(t)dt\,.$
(12)

This tells us that the measurement apparatus does not condition the dynamics
of the first moment. Using this result we can finally compute the average work
done on the cavity by the oscillatory drive using Eq. (5)

$\langle
W\rangle=g^{2}\int_{0}^{\tau}\int_{0}^{\tau}dtdt^{\prime}\lambda(t)\lambda(t^{\prime})e^{-\gamma(t-t^{\prime})/2}\,.$
(13)

In a real experiment, the homodyne signal is generated by taking the continuum
limit of the point process photocounts to a continuous photocurrent with white
noise. If the local oscillator has classical intensity fluctuations then these
will be cancelled out when the difference in the photocurrents is taken; this
is commonly known as balanced homodyne detection. Experimentally, we do not
measure $\langle\hat{q}_{J}\rangle$ at each time step $t$, but rather infer a
noisy classical estimate $X(t)$ which is derived from the observed homodyne
current $J_{\mathrm{hom}}(t)$. In an imperfect homodyne detection, we mix a
strong local oscillator (LO) with the output of the cavity. Once the LO has
been subtracted out and removed, the signal homodyne current
$J_{\mathrm{hom}}(t)$ [50, 13]

$\displaystyle J_{\mathrm{hom}}(t)$
$\displaystyle=\gamma\eta\langle\hat{a}+\hat{a}^{\dagger}\rangle_{J}+\sqrt{\gamma\eta
L}\xi(t)\,,$ (14)

where $0\leq\eta\leq 1$ is the measurement efficiency,
$\xi(t){=}d\mathcal{W}/dt$ is a delta correlated white noise and satisfies
$\langle\xi(t)\rangle=0$ and
$\langle\xi(t)\xi(t^{\prime})\rangle{=}\delta(t-t^{\prime})$ and has units of
$1/\sqrt{dt}$. Any fluctuations from the bath will show up as noise in our
measurement result and limit the precision with which we can infer
$\langle\hat{q}_{J}\rangle$. Thus, there will necessarily be errors due to
these fluctuations in our estimate of the average work $W$.

To determine the statistics of the work distributions, we must first find the
distributions associated with our estimate $X(t)$. This can be found by
defining the associated SDE $dX(t)$ of the estimate obtained from the homodyne
current $J_{\mathrm{hom}}(t)$, which is given by the classical Itô SDE

$\displaystyle
dX(t)=\frac{g}{\omega}\lambda(t)dt-\frac{\gamma}{2}X(t)dt+\sqrt{\frac{\gamma\hbar
L}{2\omega\eta}}d\mathcal{W}\,,$ (15)

where $d\mathcal{W}$ is another Wiener process. This SDE is a time-dependent
Orstein-Ulenbeck process and preserves the Gaussian nature of $X(t)$ [51]. The
general solution to this SDE is

$\displaystyle
X(\tau)=X(0)e^{-\gamma\tau/2}+\langle\hat{q}_{J}\rangle+\sqrt{\frac{\gamma\hbar
L}{2\omega\eta}}e^{-\gamma\tau/2}f(\tau)\,,$ (16)

where $f(\tau)=\int_{0}^{\tau}d\mathcal{W}e^{\gamma t/2}$ is the integrated
noise and has units of $\sqrt{dt}$. We can therefore determine the probability
distribution of each $X$ given $\langle\hat{q}_{J}\rangle$ at each time step
using only the first two moments. Unsurprisingly, the mean is trivial and
satisfies $\overline{X}{=}\langle\hat{q}_{J}\rangle$ as we would expect given
the initial condition $\overline{X}(0){=}0$. In order to find the second order
moment $\Delta X^{2}$ we need to look at the fluctuating term in Eq. (16),
which for a non-anticipating function can be written as [51]

$\Delta X^{2}=\frac{\gamma\hbar L}{2\omega\eta}e^{-\gamma\tau}f(\tau)^{2}\,.$
(17)

If we now take the average and make use the of the two-time correlation
function of $f(t)$ [51]

$\overline{f(t)f(t^{\prime})}=\int_{0}^{\mathrm{min}(t,t^{\prime})}d\tau
e^{\gamma\tau}\,,$ (18)

then we obtain the average variance

$\overline{\Delta X^{2}}=\frac{\gamma\hbar L}{2\omega\eta}\,.$ (19)

We can bring all this together to define the probability distribution over
$X(t)$ given $\langle\hat{q}_{J}\rangle$ as the Gaussian distribution

$P(X(t)|\langle\hat{q}_{J}\rangle)=\mathcal{N}\exp\left(-\frac{\omega\eta(X(t)-\langle\hat{q}_{J}\rangle)^{2}}{\hbar
L}\right)\,,$ (20)

where $\mathcal{N}=\sqrt{\omega\eta/\pi\hbar L}$ is the normalisation
constant. This distribution highlights a key component of quantum estimation
theory which states that even when using a perfect measurement $\eta{=}1$ at
zero temperature $L=1/2$, the precision of the estimate $X(t)$ of
$\langle\hat{q}_{J}\rangle$ is bounded by the Heisenberg limit. These
estimated trajectories are numerically simulated and depicted in Figure 2b.

Figure 3:  a) We plot the measured work distribution for both the forwards
(red) and backwards (green) trajectories using a total of $20000$ simulations.
Note they are not symmetric about $W=0$ which indicates a non-zero change in
$\Delta F=-0.5$—for the simulation parameters—which corresponds to the
intersection of these two distributions [5]. b) We plot $W$ as a function of
time for the forwards and backwards trajectories. Given that $\hat{\rho}_{f}$
is a NESS, it requires constant work to maintain equilibrium. We can see that
as time increases in the forward direction, the width in the estimated works
diffuse due to the cumulative effects of energy fluctuations in the
measurement signal, thus providing visual justification for inequality. (34).
In the reverse trajectories, the work at $\tau$ initially equals zero, but
quickly diffuses as the drive is on. When the drive is turned off, the work
stops at some finite value.

We now turn to finding the estimated work distributions $P(W)$ using the
general solution to the stochastic variable $X(t)$. The _estimated work_ $W$
derived from the noisy signal $X(t)$ can be used to infer the average $\langle
W\rangle$ determined by the quantum dynamics. The estimated work $W$ is given
in by integrating Eq. (16)

$W=g\omega\int_{0}^{\tau}dt\lambda(t)X(t)\,.$ (21)

If we take the average of this estimate—and ignore the stochastic force term
using the assumption $\overline{X}(0)=0$—we find that the inferred average
work corresponds to the average work done on the cavity given by Eq. (13)

$\overline{W}=\langle W\rangle\,.$ (22)

Given that the work is also a non-anticipating function, the variance can also
be defined by the stochastic term in Eq. (21). If we again make use of the
two-time correlation function Eq. (18) and integrate, then we obtain the
average variance in the estimate work

$\displaystyle\overline{\Delta W^{2}}$ $\displaystyle=\frac{g^{2}\omega\hbar
L}{\eta}\int_{0}^{\tau}\int_{0}^{\tau}dtdt^{\prime}\lambda(t)\lambda(t^{\prime})e^{-\gamma(t-t^{\prime})/2}\,,$
(23)

which is more compactly written in terms of the average work

$\overline{\Delta W^{2}}=\frac{\hbar\omega L}{\eta}\langle W\rangle\,.$ (24)

If we now integrate over the range $t\in(0,\tau]$ such that the system has
been given enough time to reach the NESS with $\lambda(\tau){=}1$, then the
inferred $W$ is well defined by a Gaussian distribution. Thus, bringing all
this together we can obtain an expression for the work distribution

$P(W)=\sqrt{\frac{\eta}{2\pi\hbar\omega L\langle
W\rangle}}\exp\left(\frac{\eta(W-\langle W\rangle)^{2}}{2\hbar\omega L\langle
W\rangle}\right)\,.$ (25)

The numerical simulation of these results along with the analytic prediction
Eq. (25) are depicted in Figure 3a showing perfect agreement.

##  4 Crooks’ Theorem and Entropy Production

We have so far described in detail the dynamics and estimation of the
thermodynamic parameters needed to determine the $\Sigma$ in this model. Now
we can make use of Crooks’ theorem [5] which tells us that the ratio of the
forward $P_{F}(W)$ and the backward $P_{B}(-W)$ work distributions are
directly related to the entropy production $\Sigma$

$\frac{P_{F}(W)}{P_{B}(-W)}=e^{\Sigma}\,,$ (26)

which holds under all the assumptions outlined in Section 2 and Section 3.
Here the reverse observations $\tilde{X}$ are generated by starting in the
final state $\hat{\rho}_{f}$ with the drive on $\lambda(t){=}1$, and then
reversing the ramp over the interval $t\in(\tau,0]$, until the system settles
back into the initial steady-state $\hat{\rho}_{i}$; this is otherwise known
as a local time-reversal transformation [52]. With the work distribution
calculated in Eq. (25), it is straight forward to compute the forward
$P_{F}(W)$ and backward distribution $P_{R}(-W)$. Taking the ratio of these
distributions in accordance with Crook’s theorem leads to

$\frac{P_{F}(W)}{P_{B}(-W)}=\exp\left({\frac{\eta(W-\Delta
F)}{\hbar\omega\left(\overline{n}+\frac{1}{2}\right)}}\right)\,,$ (27)

where $2\Delta F{=\langle W\rangle_{R}-\langle W\rangle_{F}}$ is the change in
Helmholtz Free energy and coincides with the intersection of the two work
distributions [5]. Here $\langle W\rangle_{F}$ and $\langle W\rangle_{B}$ are
the mean of the forward and backward distributions using Eq. (25)
respectively. We have also assumed that $\Delta W_{F}\approx\Delta W_{R}$
which is valid in the limit where both the forwards and backwards dynamics
have spent approximately equal time in their initial and final states as
depicted in Figure 3a and Figure 2b. Thus, we can directly associate the
exponent with the entropy production

$\Sigma=\frac{\eta(W-\Delta
F)}{\hbar\omega\left(\overline{n}+\frac{1}{2}\right)}\,.$ (28)

We confirm these results by plotting the analytic solution derived above with
the numerically fitted results using our simulations considered above.

Figure 4: A log plot of the logarithm of the ratio of $P_{F}(W)/P_{B}(-W)$ as
a function of the estimated $W$. The solid black line corresponds to our
analytic results derived in Eq. (27) where the red dashed line corresponds
numerical fit derived from our simulations in Figure (2). The gradient
corresponds to $\beta_{\mathrm{eff}}$ and the intercept corresponds to
$-\beta_{\mathrm{eff}}\Delta F$.

The results of this are depicted in Figure 4 which shows the log plot of Eq.
(27) where the gradient corresponds to effective temperature

$\beta_{\mathrm{eff}}=\frac{\eta}{\hbar\omega\left(\overline{n}+\frac{1}{2}\right)}\,,$
(29)

which agrees—up to the measurement efficiency $\eta$—with that derived from
the Wigner Entropy Ref. [48] and ensures the entropy production does not
diverge at zero temperature $\overline{n}{=}0$. It is important to note that
we are not arguing that $\beta_{\mathrm{eff}}$ is the inverse
temperature—which is the bath temperature $T$—but that it is related to the
stochastic fluctuations in the inferred work $W$ and is determined by the
energy of the bath and the measurement efficiency. When $\overline{n}{=}0$,
the presence of zero point energy ensures that
$\beta_{\mathrm{eff}}{=}2/\hbar\omega$ and thus leads to a well defined
entropy production.

Unlike the Wigner Entropy derivation, our derivation shows that
$\beta_{\mathrm{eff}}$ depends explicitly on the measurement efficiency,
highlighting that the effective temperature is directly related to the
measurement record. When $\eta=0$, no information about the work is gained,
and thus the measured entropy production in zero. Given that the effective
inverse temperature $\beta_{\mathrm{eff}}$ is determined by the fluctuations
in the measurement record, we can therefore think of this as the entropy
produced to acquire the estimate of the work.

We can now compute the average entropy production in the forwards direction by
computing the relative Shannon entropy of the work distributions from our Eq.
(27)

$\displaystyle\overline{\Sigma}$ $\displaystyle=\int
dWP_{F}(W)\log\left(\frac{P_{F}(W)}{P_{B}(-W)}\right)\,,$ (30)
$\displaystyle=\beta_{\mathrm{eff}}\left(\overline{W}_{F}-\Delta F\right)\,.$
(31)

We further verify this result by numerically finding the ratio of the forward
and backward work distributions plotted in Figure 3a and plotting it against
the Eq. (31) which is depicted in Figure 4. Moreover it allows us to define
the inequality of the entropy production

$\overline{\Sigma}\geq\beta_{\mathrm{eff}}\overline{W}_{F}\,.$ (32)

On closer inspection, one will recognise the RHS of this inequality as equal
to $\overline{\Sigma}{\geq}2\langle W\rangle_{F}^{2}/\overline{\Delta
W_{F}^{2}}$, where the variance is given by Eq. (24), which is consistent with
TURs [8]. Thermodynamic uncertainty relations quantify the fundamental lower
bound on the trade-off between precision with which thermodynamic quantities
can be measured—namely the signal to noise ratio (SNR)—and entropy production.
This precision is related to the integrated current exchanged during an out-
of-equilibrium process over some time interval, which in this case is related
to the average work inferred via the measured homodyne signal. Therefore we
can think of Eq. (30) as a TUR that is the minimum amount of entropy produced
when estimating the work $\overline{W}_{F}$ in a temperature quantum system
under the described dynamics. Furthermore, as the average amount of work
increases, so to does the entropy which corresponds to a decrease in the SNR.
This is due to the diffusive nature of work distribution Eq. (25) and can be
seen clearly in the Figure 3c. When driven far from equilibrium the cavity
requires constant work be done to maintain the NESS. However due to the
measurement fluctuations arising from the homodyne signal, this estimate is
stochastic and diffuses in time.

##  5 Classical Fisher Information (FI) and a new inequality

We have thus far characterised thermodynamic quantities such as work and
entropy production in a low temperature, quantum optical cavity, by applying
classical estimation theory to the homodyne detection measurement record. We
now quantify how much signal (or information) is carried by our estimation $W$
of the average work done $\langle W\rangle_{F}$ in the forward process, using
classical FI $I(\langle W\rangle_{F})$. Mathematically, the FI of the work
distribution is defined

$I(\overline{W}_{F})=-\mathrm{E}\left[\left.\frac{\partial^{2}}{\partial\overline{W}^{2}}\log(P(W))\right|\overline{W}_{F}\right]\,,$
(33)

which we can compute using Eq. (25) to obtain

$I(\overline{W}_{F})=\frac{\beta_{\mathrm{eff}}}{2\overline{W}_{F}}+\frac{1}{\overline{W}_{F}^{2}}\geq\frac{1}{\overline{\Delta
W^{2}}}\,,$ (34)

which is the Cramér-Rao inequality for large $\overline{W}_{F}$ as the
estimated work becomes an unbiased estimator. The Cramér-Rao inequality tells
us that the precision with which we can estimate the average work
$\overline{W}_{F}$ decreases with the amount of work done due to cumulative
effect of fluctuations in our measurement record. As an interesting aside,
this result may be useful in understanding the relation to the precision in
time keeping, which is the conjugate variable of energy. As more heat is
dissipated, the Fisher information in the energy estimate decreases, but
arguably increases in the precision of time [53, 54, 55]. The effect of this
can be seen in the diffusive nature of the estimated work in Figure 2d for
increasing time.

Figure 5: Trade off between classical FI and the entropy production of
measurements of the average work $\overline{W}$. The green region is satisfies
the inequality, whereas the purple region does not.

By itself, the Cramér-Rao inequality alone is unsurprising, but we can now go
a step further and combine the quantum inequality (30) and the Cramér-Rao
inequality (34) under a single bound

$I(\overline{W}_{F})\overline{\Sigma}\geq\frac{\beta_{\mathrm{eff}}^{2}}{2}\,.$
(35)

This inequality tells us that the product of the information about
$\overline{W}_{F}$ which is obtained by producing entropy $\overline{\Sigma}$
must always be greater than half of the squared effective inverse temperature.
The interpretation of this inequality is straight forward: estimating a
thermodynamic variable such as work $\overline{W}_{F}$ requires that a minimum
amount of entropy be produced in the measurement process. However this
measurement is not error free due to cumulative effect of fluctuations in the
measurement record due to non-zero effective temperature of the bath. Thus,
greater information $I(\overline{W}_{F})$ requires lowering the average
entropy production, but at the quantum limit with unit efficiency $\eta{=}1$,
this cannot be reduced to zero: there will always be errors in the measurement
record producing entropy as depicted in Figure 5.

##  6 Conclusion

In this article we have sought to establish how the entropy production for
zero temperature quantum systems can be defined. Using stochastic quantum
thermodynamics we have shown that for a zero temperature optical cavity
subject to homodyne detection, the inverse temperature $\beta$ is replaced by
the effective inverse temperature $\beta_{\mathrm{eff}}$ which is related to
the zero point energy of the environment. This effective temperature does not
diverge at zero temperature and thus ensures that the estimated entropy
production is well defined even as the environment approaches zero
temperature. This result further corroborates the effective temperature
derived using the Wigner entropy [48, 27]. The implication of this work is
that it is physically meaningful to define entropy production using continuous
measurement records and estimations of thermodynamic quantities. In doing so,
the role of the measurement device is seen to be critical, as it sets the
nature of the measured fluctuations. Furthermore, the entropy contained in the
measurement record connects Crooks’ fluctuation theorem at the quantum limit
to the Cramér Rao bound, under a single information inequality (35). This
inequality fundamentally bounds the trade-off between Fisher information and
entropy production for a zero temperature quantum system subject to continuous
homodyne measurement. From this we can see that measuring a higher average
entropy production necessarily implies lower FI in the measured signal. Thus
higher entropy coincides with lower precision and agrees with the standard
interpretation of the TUR. Finally, our results hold for Gaussian states,
weakly coupled to the bath, with a linear Hamiltonian. It will be interesting
to consider in future work whether it also holds in the strong coupling limit
[56], and for higher order Hamiltonians containing dissipative phase
transitions [57, 58].

##  7 Acknowledgements

We would like to thank Gerard Milburn for many illuminating discussions and
recommendations. This work was supported by the Australian Research Council
Centre of Excellence for Engineered Quantum Systems (Project No.CE170100009),
and the Foundational Questions Institute Fund (Project No. FQXi-IAF19-04).

## References

  * [1] John Goold, Marcus Huber, Arnau Riera, Lídia del Rio, and Paul Skrzypczyk.  “The role of quantum information in thermodynamics—a topical review”.  Journal of Physics A: Mathematical and Theoretical 49, 143001 (2016).
  * [2] Sai Vinjanampathy and Janet Anders.  “Quantum thermodynamics”.  Contemporary Physics 57, 545–579 (2016).
  * [3] Udo Seifert.  “Stochastic thermodynamics, fluctuation theorems and molecular machines”.  Reports on Progress in Physics 75, 126001 (2012).
  * [4] C. Jarzynski.  “Nonequilibrium Equality for Free Energy Differences”.  Physical Review Letters 78, 2690–2693 (1997).
  * [5] Gavin E. Crooks.  “Entropy production fluctuation theorem and the nonequilibrium work relation for free energy differences”.  Physical Review E 60, 2721–2726 (1999).
  * [6] Takahiro Hatano and Shin-ichi Sasa.  “Steady-State Thermodynamics of Langevin Systems”.  Physical Review Letters 86, 3463–3466 (2001).
  * [7] Udo Seifert.  “Entropy Production along a Stochastic Trajectory and an Integral Fluctuation Theorem”.  Physical Review Letters 95, 040602 (2005).
  * [8] Jordan M. Horowitz and Todd R. Gingrich.  “Thermodynamic uncertainty relations constrain non-equilibrium fluctuations”.  Nature Physics 16, 15–20 (2020).
  * [9] Philipp Strasberg.  “Operational approach to quantum stochastic thermodynamics”.  Physical Review E 100, 022127 (2019).
  * [10] Philipp Strasberg and Massimiliano Esposito.  “Non-Markovianity and negative entropy production rates”.  Physical Review E 99, 012120 (2019).
  * [11] E. B. Davies.  “Quantum stochastic processes”.  Communications in Mathematical Physics 15, 277–304 (1969).
  * [12] Crispin Gardiner and Peter Zoller.  “Quantum noise: A handbook of markovian and non-markovian quantum stochastic methods with applications to quantum optics”.  Springer Science and Business Media. (2004).
  * [13] Howard M. Wiseman and Gerard J. Milburn.  “Quantum Measurement and Control”.  Cambridge University Press. (2009).
  * [14] Shaul Mukamel.  “Quantum Extension of the Jarzynski Relation: Analogy with Stochastic Dephasing”.  Physical Review Letters 90, 170604 (2003).
  * [15] Sandu Popescu, Anthony J. Short, and Andreas Winter.  “Entanglement and the foundations of statistical mechanics”.  Nature Physics 2, 754–758 (2006).
  * [16] Massimiliano Esposito, Upendra Harbola, and Shaul Mukamel.  “Nonequilibrium fluctuations, fluctuation theorems, and counting statistics in quantum systems”.  Reviews of Modern Physics 81, 1665–1702 (2009).
  * [17] Gabriel T. Landi and Mauro Paternostro.  “Irreversible entropy production: From classical to quantum”.  Rev. Mod. Phys. 93, 035008 (2021).
  * [18] Michele Campisi, Peter Hänggi, and Peter Talkner.  “Colloquium: Quantum fluctuation relations: Foundations and applications”.  Reviews of Modern Physics 83, 771–791 (2011).
  * [19] Yoshihiko Hasegawa.  “Thermodynamic Uncertainty Relation for General Open Quantum Systems”.  Physical Review Letters 126, 010602 (2021).
  * [20] Harry J. D. Miller, M. Hamed Mohammady, Martí Perarnau-Llobet, and Giacomo Guarnieri.  “Joint statistics of work and entropy production along quantum trajectories”.  Phys. Rev. E 103, 052138 (2021).
  * [21] P. G. Di Stefano, J. J. Alonso, E. Lutz, G. Falci, and M. Paternostro.  “Nonequilibrium thermodynamics of continuously measured quantum systems: A circuit qed implementation”.  Phys. Rev. B 98, 144514 (2018).
  * [22] Jordan M. Horowitz.  “Quantum-trajectory approach to the stochastic thermodynamics of a forced harmonic oscillator”.  Physical Review E 85, 031110 (2012).
  * [23] Jordan M. Horowitz and Juan M. R. Parrondo.  “Entropy production along nonequilibrium quantum jump trajectories”.  New Journal of Physics 15, 085028 (2013).
  * [24] Jose Joaquin Alonso, Eric Lutz, and Alessandro Romito.  “Thermodynamics of Weakly Measured Quantum Systems”.  Physical Review Letters 116, 080403 (2016).
  * [25] Cyril Elouard, David A. Herrera-Martí, Maxime Clusel, and Alexia Auffèves.  “The role of quantum measurement in stochastic thermodynamics”.  npj Quantum Information3 (2017).
  * [26] Sreenath K. Manikandan, Cyril Elouard, and Andrew N. Jordan.  “Fluctuation theorems for continuous quantum measurements and absolute irreversibility”.  Phys. Rev. A 99, 022117 (2019).
  * [27] Alessio Belenchia, Luca Mancino, Gabriel T. Landi, and Mauro Paternostro.  “Entropy production in continuously measured Gaussian quantum systems”.  npj Quantum Information6 (2020).
  * [28] M. Naghiloo, D. Tan, P. M. Harrington, J. J. Alonso, E. Lutz, A. Romito, and K. W. Murch.  “Heat and Work Along Individual Trajectories of a Quantum Bit”.  Physical Review Letters 124, 110604 (2020).
  * [29] Yelena Guryanova, Nicolai Friis, and Marcus Huber.  “Ideal Projective Measurements Have Infinite Resource Costs”.  Quantum 4, 222 (2020).
  * [30] Cyril Elouard, David Herrera-Martí, Benjamin Huard, and Alexia Auffèves.  “Extracting Work from Quantum Measurement in Maxwell’s Demon Engines”.  Physical Review Letters 118, 260603 (2017).
  * [31] M. Naghiloo, J. J. Alonso, A. Romito, E. Lutz, and K. W. Murch.  “Information Gain and Loss for a Quantum Maxwell’s Demon”.  Physical Review Letters 121, 030604 (2018).
  * [32] Juliette Monsel, Marco Fellous-Asiani, Benjamin Huard, and Alexia Auffèves.  “The Energetic Cost of Work Extraction”.  Physical Review Letters 124, 130601 (2020).
  * [33] Mark T. Mitchison, John Goold, and Javier Prior.  “Charging a quantum battery with linear feedback control”.  Quantum5 (2021).
  * [34] Yoshihiko Hasegawa.  “Quantum Thermodynamic Uncertainty Relation for Continuous Measurement”.  Physical Review Letters 125, 050601 (2020).
  * [35] Andre C. Barato and Udo Seifert.  “Thermodynamic Uncertainty Relation for Biomolecular Processes”.  Physical Review Letters 114, 158101 (2015).
  * [36] Patrick Pietzonka, Andre C. Barato, and Udo Seifert.  “Universal bounds on current fluctuations”.  Physical Review E 93, 052145 (2016).
  * [37] Patrick Pietzonka and Udo Seifert.  “Universal Trade-Off between Power, Efficiency, and Constancy in Steady-State Heat Engines”.  Physical Review Letters 120, 190602 (2018).
  * [38] Tan Van Vu and Yoshihiko Hasegawa.  “Thermodynamic uncertainty relations under arbitrary control protocols”.  Physical Review Research 2, 013060 (2020).
  * [39] Tan Van Vu and Yoshihiko Hasegawa.  “Uncertainty relation under information measurement and feedback control”.  Journal of Physics A: Mathematical and Theoretical 53, 075001 (2020).
  * [40] Patrick P. Potts and Peter Samuelsson.  “Thermodynamic uncertainty relations including measurement and feedback”.  Physical Review E 100, 052137 (2019).
  * [41] Maxime Debiossac, David Grass, Jose Joaquin Alonso, Eric Lutz, and Nikolai Kiesel.  “Thermodynamics of continuous non-Markovian feedback control”.  Nature Communications11 (2020).
  * [42] F. J. Cao and M. Feito.  “Thermodynamics of feedback controlled systems”.  Physical Review E 79, 041118 (2009).
  * [43] Jordan M. Horowitz and Suriyanarayanan Vaikuntanathan.  “Nonequilibrium detailed fluctuation theorem for repeated discrete feedback”.  Physical Review E 82, 061120 (2010).
  * [44] Zongping Gong, Yuto Ashida, and Masahito Ueda.  “Quantum-trajectory thermodynamics with discrete feedback control”.  Phys. Rev. A 94, 012107 (2016).
  * [45] Yûto Murashita, Zongping Gong, Yuto Ashida, and Masahito Ueda.  “Fluctuation theorems in feedback-controlled open quantum systems: Quantum coherence and absolute irreversibility”.  Phys. Rev. A 96, 043840 (2017).
  * [46] Gonzalo Manzano and Roberta Zambrini.  “Quantum thermodynamics under continuous monitoring: a general framework” (2021).  arXiv:2112.02019.
  * [47] Lluís Masanes and Jonathan Oppenheim.  “A general derivation and quantification of the third law of thermodynamics”.  Nature Communications8 (2017).
  * [48] Jader P. Santos, Gabriel T. Landi, and Mauro Paternostro.  “Wigner Entropy Production Rate”.  Physical Review Letters 118, 220601 (2017).
  * [49] Gerardo Adesso, Davide Girolami, and Alessio Serafini.  “Measuring Gaussian Quantum Information and Correlations Using the Rényi Entropy of Order 2”.  Physical Review Letters 109, 190502 (2012).
  * [50] H. M. Wiseman and G. J. Milburn.  “Quantum theory of field-quadrature measurements”.  Physical Review A 47, 642–662 (1993).
  * [51] Crispin Gardiner.  “Stochastic Methods: A Handbook for the Natural and Social Sciences”.  Springer Series in Synergetics. Springer-Verlag. Berlin Heidelberg (2009).  4 edition.  url: www.springer.com/gp/book/9783540707127.
  * [52] Alireza Seif, Mohammad Hafezi, and Christopher Jarzynski.  “Machine learning the thermodynamic arrow of time”.  Nature Physics17 (2021).
  * [53] Paul Erker, Mark T. Mitchison, Ralph Silva, Mischa P. Woods, Nicolas Brunner, and Marcus Huber.  “Autonomous Quantum Clocks: Does Thermodynamics Limit Our Ability to Measure Time?”.  Physical Review X 7, 031022 (2017).
  * [54] G. J. Milburn.  “The thermodynamics of clocks”.  Contemporary Physics61 (2020).
  * [55] A. N. Pearson, Y. Guryanova, P. Erker, E. A. Laird, G. A. D. Briggs, M. Huber, and N. Ares.  “Measuring the Thermodynamic Cost of Timekeeping”.  Physical Review X 11, 021029 (2021).
  * [56] H. J. D. Miller and J. Anders.  “Energy-temperature uncertainty relation in quantum thermodynamics”.  Nature Communications 9, 2203 (2018).
  * [57] Bruno O. Goes and Gabriel T. Landi.  “Entropy production dynamics in quench protocols of a driven-dissipative critical system”.  Physical Review A 102, 052202 (2020).
  * [58] Bruno O. Goes, Carlos E. Fiore, and Gabriel T. Landi.  “Quantum features of entropy production in driven-dissipative transitions”.  Physical Review Research 2, 013136 (2020).