11institutetext: University of Mannheim, Schloss, 68131 Mannheim, Germany
11email<EMAIL_ADDRESS>22institutetext: Fraunhofer IESE,
Fraunhofer-Platz 1, 67663 Kaiserslautern, Germany 22email: {ioannis.sorokos,
andreas.schmidt, naveed.akram<EMAIL_ADDRESS>33institutetext: University of Hull, Cottingham Rd., HU6 7RX Hull, UK 33email:
<EMAIL_ADDRESS>
# Keep your Distance: Determining Sampling and Distance Thresholds in Machine
Learning Monitoring

Al-Harith Farhad 11 0000-0001-6749-0620  Ioannis Sorokos 22
0000-0003-2704-8381 Andreas Schmidt 22 0000-0002-7113-7376 Mohammed Naveed
Akram 22 0000-0002-0924-5536 Koorosh Aslansefat 33 0000-0001-9318-8177 Daniel
Schneider 22 0000-0003-3465-9738

###### Abstract

Machine Learning (ML) has provided promising results in recent years across
different applications and domains. However, in many cases, qualities such as
reliability or even safety need to be ensured. To this end, one important
aspect is to determine whether or not ML components are deployed in situations
that are appropriate for their application scope. For components whose
environments are open and variable, for instance those found in autonomous
vehicles, it is therefore important to monitor their operational situation to
determine its distance from the ML components’ trained scope. If that distance
is deemed too great, the application may choose to consider the ML component
outcome unreliable and switch to alternatives, e.g. using human operator input
instead. SafeML is a model-agnostic approach for performing such monitoring,
using distance measures based on statistical testing of the training and
operational datasets. Limitations in setting SafeML up properly include the
lack of a systematic approach for determining, for a given application, how
many operational samples are needed to yield reliable distance information as
well as to determine an appropriate distance threshold. In this work, we
address these limitations by providing a practical approach and demonstrate
its use in a well known traffic sign recognition problem, and on an example
using the CARLA open-source automotive simulator.

###### Keywords:

Machine Learning Monitoring Safety Uncertainty

##  1 Introduction

The continuous expansion of application fields of _Machine Learning_ (ML) into
safety-critical domains, such as autonomous vehicles, entails an increasing
need for suitable safety assurance approaches. One key aspect in this regard
is to get a grasp on the confidence associated with an output of a ML
component. While some ML models provide a probabilistic output that can be
interpreted as a level of confidence, such output is not alone sufficient to
establish overall trust. Significant progress has been made towards addressing
this question, with approaches that introduce more sophisticated evaluation of
a given model’s outputs. Model-specific approaches base their evaluation on
understanding of the internals of the given ML model, e.g. [23] focus on the
second-to-last layer of a given deep neural network. On the other hand, model-
agnostic approaches treat models as black-boxes, basing their evaluation on
properties that can be interrogated externally, e.g. in [16], surrogate models
are constructed during training to later provide uncertainty estimates of the
ML model in question. An additional concern for evaluating ML models, is that
the evaluation must also satisfy the application requirements, in particular
with regards to performance. For instance, the authors in [25] propose
auxiliary networks for evaluation, but the computational capacity needed to
estimate them hinders their roll-out into real-time systems. On a general
note, the approaches discussed here, including ours, can be building blocks in
assuring important quality properties of ML components and maybe even safety,
but they will hardly be the silver bullet that solves the challenge alone. A
safety argument for a system with ML components will typically be very
specific for a given application and its context and comprise of a diverse
range of measures and assumptions, many of which we would expect to include
both development-time approaches, as well as runtime approaches, with ours
falling under the latter category.

SafeML, proposed in [2] and improved in [1], is a runtime approach for
evaluating ML model outputs. In brief, SafeML compares training and
operational data of the ML model in question, and determines whether they are
statistically ’too distant’ to yield a trustworthy answer. The work in [1]
further demonstrates a bootstrap-based p-value estimation extension to improve
confidence in measurements. However, the existing literature does not explain
how specific challenges for practical application of SafeML are addressed.

Our contribution is to identify these limitations and propose an approach that
enables a systematic application of SafeML and overcomes them. For the
remainder of Sec. 1, we provide a more detailed description of previous work
on SafeML. We then discuss what its practical limitations are, provide the
motivation behind our approach, and then further detail our contributions.

###  1.1 SafeML

SafeML is a collection of measures that estimate the statistical distance
between training and operational datasets based on the _Empirical Cumulative
Distribution Function_ (ECDF). In [2], the estimated distance has been shown
to negatively correlate with a corresponding ML model’s accuracy. In the same
paper, a plausible workflow of applying SafeML for monitoring ML was also
proposed. Per the workflow, an ML task can be divided into two phases, an
offline/training phase and an online/application phase. In the training phase,
it is assumed that we have a trusted dataset and there is no uncertainty
associated with its labels. An ML model, such as a deep neural network or a
support vector machine, can be trained using the trusted data. Assuming the
model passes its validation testing, then it can be used in the online phase.
Also in the training phase, the ECDF of each feature and each class is stored
for later comparison in the online/application phase.

In the online/application phase, the same trained model and a buffer is
provided to gather a sufficient number of samples from inputs. The number of
buffered samples should be enough such that the distance determination can be
relied upon, but the existing approach does not provide further guidance on
how this number should be specified. When a large enough number of samples is
obtained, based on the trained classifier decisions, the ECDF of each feature
and each class is calculated. The ECDF-based statistical distance measures are
used to evaluate the differences between the trusted dataset and the buffered
data. To ensure that the statistical measures are valid, a bootstrap-based
p-value evaluation method is added to the measurements, per [1]. The user of
the method must then specify a minimal distance threshold (and additional ones
optionally) for the distance measures. The proposed workflow suggests that if
the outcome is slightly above the minimal threshold, additional data can be
requested. Instead, if the outcome is significantly above the threshold value
(or a specified additional threshold), alternative actions can be taken, e.g.
operator intervention. If the outcome is below the minimal threshold (or a
specified additional threshold), the decision of the machine learning
algorithm can be trusted and the statistical distance measures can be stored
to be reported.

SafeML, being model-agnostic, can be flexibly deployed in numerous
applications. In [1, 2], Aslansefat et al. already presented experimental
applications of SafeML on security attack detection [27], and _German Traffic
Sign Recognition Benchmark_ (GTSRB) examples [30]. For security intrusion
detection, SafeML measures are used to compare the statistical distances
against the accuracy of classifier. In the GTSRB example, the model is
trained, and the incorrectly classified set of images are compared against
randomly selected input images from the training set.

###  1.2 Motivation

As mentioned in Sec. 1.1, applying SafeML requires specification of the number
of runtime samples needed to be acquired, and at least the minimal distance
threshold for acceptance/rejection. Both parameters must be defined during
development time, as they need to be known by the time the ML model is in
operation. Existing work in SafeML does not investigate nor provide guidance
for establishing these parameters, leaving it up to the user to find
reasonable values.

However, this is not a trivial matter, as identifying appropriate thresholds
has application-related implications. As will be highlighted further in Sec.
3, an inadequate number of runtime samples may results in low statistical
power of the SafeML-based evaluation, whereas collecting too many samples can
be inefficient and limit application performance. Addressing these limitations
is the focus of this publication.

Statistical power is the probability of a correctly rejected null-hypothesis
test i.e. the probability of a true positive, given a large enough population
[7]. Conversely, by presetting a required level of statistical power, the
population size needed to correctly distinguish two distribution can be
calculated through power analysis. Similarly, distance thresholds that are too
low can lead to overflowing the host application with false positive alarms,
whereas distance thresholds that are too high can lead to overlooking
potentially critical conditions. Concretely, we establish the following
research questions:

  1. RQ1:

Dissimilarity-Accuracy Correlation. Can we confirm that data points seen
during operation that are dissimilar to training data impact the model’s
performance in terms of accuracy?

  2. RQ2:

Sample Size Dependency. Can we determine whether the sample size affects the
accuracy of the SafeML distance estimation?

###  1.3 Paper Contribution and Outline

The contribution of the paper is three-fold. First, we use power analysis to
specify sampling requirements for SafeML monitoring at runtime. Secondly, we
systematically determine appropriate SafeML distance thresholds. Finally, we
apply the above method in the context of an exemplary automotive simulation.

The remainder of the paper is as follows: In Sec. 2, we discuss background and
related work, including approaches both similar, and differing to SafeML. In
Sec. 3, we describe our approach for systematically applying SafeML and
determining relevant thresholds, as well as our experimental setup. In Sec. 4,
we discuss our experimental results before we recap our key points and discuss
future work in Sec. 5.

##  2 Background and Related Work

To briefly recap, in [1, 2] the authors propose statistical distance measures
to compare the distributions of the training and operational datasets; the
measures are based on established two-sample statistical testing methods,
including the Kolmogorov-Smirnov, Anderson-Darling, Cramer von Mises [8], and
Wasserstein methods [24]. The statistical distance measures used by SafeML
capture the dissimilarity between different two distributions, but the
approach itself does not propose an explicit threshold at which those
distributions are not equivalent, nor a means of how to determine one
systematically.
Setting meaningful thresholds is a reoccurring problem in ML and data-driven
applications. A method based on the 3-sigma rule was shown to provide suitable
threshold criteria in Hidden Markov Models under the assumption of normal
distribution [6]. Our approach is similar in the sense that we used the same
principle, but we did not assume that our datasets are normally distributed.
Therefore, instead of a 3-sigma rule, we opted for a gradual increase of the
threshold based on the sigma value. We elaborate on this further in Sec. 3.

A prerequisite for transition of AI applications into safety- and security-
critical systems is having available guarantees and guidelines to assure
underlying system dependability. A method was proposed in [25] to assure the
model’s operation within the intended context in a model-agnostic manner,
where an additional autoencoder-based network is used to detect semantic
novelty.
However, the innate problem of using neural networks, including autoencoders,
is their black-box nature with respect to explainability, which inhibits the
establishment of dependability guarantees. Hence, the use of a more
explainable statistical method could serve as a solution to this issue. This
includes our proposed approach here, as the ECDF-based distance to the
training set could provide additional insight to the model’s decision.

In [23], the authors propose a commonality metric, which inspects the second-
to-last layer of a _Deep Neural Network_ (DNN). The proposed metric expresses
the ratio between the activation of the neurons in the last layer during
training (across all training instances), versus their activation during
operation, for the given operational input. The approach shares common ideas
with SafeML, but diverges in terms of being model-specific, as the metric
samples directly the last layer’s neurons. Instead, SafeML does not consider
the model internals, and makes no assumption on the distribution of the
training and operational data.

Efforts have been made to ensure a dependable and consistent behavior in AI-
based applications. These took various forms, from providing generative
models, whose outputs can be interpreted as a confidence of predictions to the
aforementioned novelty detection. However, design-time safety measures have
been introduced in [28], where the robustness of neural networks could be
certified through a novel abstract domain, before deployment. Similarly, a
feature-guided safety testing method of neural network was proposed in [31] to
evaluate the robustness of neural network by feeding them through adversarial
examples. Markov decision processes were also proposed to be paired with
neural networks to verify their robustness through statistical model checking
[12].

Uncertainty wrappers are another notable concept [13, 14, 15, 16]. This
mathematical concept distinguishes ML uncertainty into three layers I) model
performance, II) input quality and III) scope compliance, and provides a set
of useful functions to evaluate the existing uncertainties in each step. The
uncertainty wrapper can be compared with SafeML in the third layer (scope
compliance). Both of them are model-agnostic.

Safeguard AI [17] proposes to calculate the likelihood of _out-of-
distribution_ (OOD) inputs, and add it to the loss function of the ML/DL
model. This approach also uses a _Generative Adversarial Network_ (GAN) to
produce boundary data in order to create a more accurate OOD. In comparison to
SafeML, the approach is model-specific and cannot be evaluated at runtime.

Another common theme across approaches for safeguarding ML models is
investigating all conceivable input perturbations and produce robust, safe,
and abstract interpretable solutions and certifications for ML/DL models [10,
26, 9, 19, 18, 20]. These approaches are also model-specific and do not
provide runtime solutions. Similar to previous approaches, _DeepImportance_ is
a model-specific solution that presents a new _Importance-Driven Criteria_
(IDC) as a layer-wise function to be assessed during the test procedure and
provided a systematic framework for ML testing [11]. Regarding the reliability
evaluation of ML models, only a small number of solutions are provided so far
and one them is ReAsDL. ReAsDL divides the input space into tiny cells and
evaluates the ML/DL reliability based on the cells’ robustness and operational
profile probability [32, 33]. This solution is model-agnostic and has focused
on classification tasks similar to SafeML. The NN-Dependability-kit has
suggested a new set of dependability measures to assess the impact of
uncertainty reduction in the ML/DL life cycle. They also include a formal
reasoning engine to ensure that the ML/DL dependability is guaranteed. The
approach can be used for runtime purposes [3].

##  3 Methodology

In this section, we present our refined approach for applying SafeML, in the
form of a proposed workflow, and address the question of determining the
sampling and distance thresholds. To validate our approach, we applied SafeML
both towards ML monitoring during simulation, as well as using it against an
existing dataset, the GTSRB. In the next section, we describe the experimental
design for our empirical evaluation of the proposed approach.

###  3.1 Process Workflow

The process workflow to determining the needed number of samples as well as
the distance threshold is divided into three stages as shown in Fig. 1.

Figure 1: Process flowchart

  * •

Acquisition: In this stage, two datasets are involved, a training dataset and
a testing dataset. In our empirical experiments (see sec. 3.2), these datasets
are generated from the simulation, but in general they should be derived
during development. At this point, power analysis is used to find the number
of samples to determine the difference between the operational and training
set. In general, this factor can be calibrated for the application at hand, as
it determines an additional number of samples beyond the minimum needed to
achieve the determined test power. The effect size for the power analysis is
established between the training and testing set, using Cohen’s d coefficient
[4].

  * •

Training: The training dataset is processed and split into a training set and
a testing set. A sub-sample of the smaller training set is uniformly sampled
to represent the _Training Scope Set_ (TSS) in the calculation of statistical
distances to reduce computational complexity during runtime. A model is then
built from the smaller training set and used to predict the outputs of the
testing set. The result is further distinguished into correctly and
incorrectly classified outputs, where SafeML measures evaluate the statistical
distance between the incorrectly classified outputs and the TSS. The resulting
distances are finally used as the initial distance threshold.

  * •

Operation: Once the trained model is in operation, the value obtained in the
Acquisition stage is used to aggregate operational data points into an
operational set. SafeML measures evaluate the statistical distance between
this operational set and the TSS. If the value falls within the defined
threshold, the model continues its operation normally, otherwise, a signal is
sent to run a user-defined action.

###  3.2 Experiment Setup

We performed experiments on German Traffic Sign Recognition Benchmark
(GTSRB)[29] and on a synthetic example dataset in the CARLA
simulator111https://carla.org [5] for evaluating our approach. CARLA is an
automotive simulator used for the development, training, and validation of
autonomous driving systems. The dataset generated from CARLA was used to
evaluate the confidence level of SafeML predictions and the autopilot
decisions of the simulated vehicle. The GTSRB dataset is a collection of
traffic sign images, along with their labels used for benchmarking the ML
algorithms. It was first used in 2011. The dataset is a good representation of
safety-critical application of ML-components. Hence, it was also considered in
this work for the evaluation of the approach presented.

The CARLA setup allows us to identify a systematic method for estimating the
minimum number of required samples and the distance acceptance threshold
though a fixed-point iteration as well as their implication on the model’s
prediction, and how they correlate to the model’s performance. A simple model
was built from a dataset sampled from CARLA, using a vehicle autopilot with
varying driver profiles (shown in Tab. 1). This corresponds to the
‘Acquisition’ step in section sec. 3.1. The three types of driving profiles
were considered: safe, moderate, and dangerous. We should note that the
profiles (and the model) were not designed with an aim to provide an accurate
risk behavior estimation, but rather as a source of plausible ground truth for
evaluating SafeML. This dataset was used as the ground truth to train
classifiers, whose performance was evaluated through subsequent simulation in
CARLA.

For GTSRB, as the dataset is already available, create dataset was assumed to
be complete from ‘Acquisition’ phase. Then, a network was built to classify
the GTSRB dataset. We built a simple convolutional neural network, as they are
known for their superior performance on image applications. We then applied
the approach mentioned in 3. This allows to obtain the minimum number of
required samples and the distance acceptance threshold for this application.

Table 1: Properties of Driver Profiles Property/Driving Profile | Safe | Moderate | Dangerous
---|---|---|---
Max Speed | 30% below limit | At limit | 30% Above limit
Traffic Signs | Abide by all | Ignore 50% | Ignore 100%
Automatic Lane-change | No | Yes | Yes
Distance to Other Cars | 5 m | 3 m | 0 m

We trained a CNN network. The network was able to achieve a decent accuracy of
around 99.73%. We remind readers that SafeML is model-agnostic, and other ML
models could also have been used. This high accuracy resulted in very few
incorrect samples to test SafeML. Thus one of the classes was excluded to be
considered as an out-of-scope class which reduced the accuracy to 97.5%. This
added a greater disparity to allow for the validation of SafeML.

Table 2: Properties of Driver Profiles Model | Class | Recall | Precision | F1-Score
---|---|---|---|---
kNN | 0 | 0.89 | 0.95 | 0.92
| 1 | 0.0.96 | 0.90 | 0.93
| 2 | 0.96 | 0.95 | 0.96
Random Forest | 0 | 0.83 | 0.52 | 0.64
| 1 | 0.81 | 0.88 | 0.84
| 2 | 0.72 | 0.92 | 0.81
LSTM | 0 | 0.92 | 0.99 | 0.96
| 1 | 0.99 | 0.91 | 0.95
| 2 | 1.00 | 1.00 | 1.00

In [2], SafeML distance measures have been shown to negatively correlate with
the accuracy of the model. From this fact, and according to the first research
question established in Sec. 1.2, we hypothesize that misclassified points
would have a higher distance than correctly classified data points due to
their dissimilarity to the training set.

Furthermore, from principles of statistical analysis, it is established that
using an insufficient number of samples during hypothesis testing, there is a
risk of the statistical tests not achieving sufficient power. As per our
second research question in Sec. 1.2, our corresponding hypothesis is that the
number of samples correlates with confidence of dissimilarity (the magnitude
of the distance).

The experiment concludes by following the ‘Operation’ step of the process
workflow explained in Sec. 3.1. In CARLA example, the same experiment was
reproduced in different environment setups to ensure the consistency of the
results. In GTSRB, this was performed on the test set, which can be replaced
by runtime dataset, at runtime.

##  4 Results

###  4.1 Preliminary Findings

Before continuing through the workflow of the simulation, analysis of the
trained model was used to test the predefined hypotheses in Sec. 3.2, namely:

  * RQ1

: Dissimilarity-Accuracy Correlation was tested by calculating the statistical
distance between the correctly classified data points and the TSS, as well the
incorrectly classified data points and the training scope. Tab. 3 shows the
mean and standard deviation of each of the statistical distance measures used.
It shows that the incorrectly classified points are highly dissimilar to the
TSS (higher distance), supporting the corresponding hypothesis.

  * RQ2

: Sample Size Dependence: Due to the model’s accuracy of 80%, the amount of
correctly classified data points were significantly larger than incorrectly
classified points when the distances in Tab. 3 were calculated. To account for
the number of samples, the distances were calculated over a varying number of
randomly sampled points of each group. As shown in Fig. 2, the distance of
incorrectly classified points is always larger than the distance of correctly
classified points and increases with increasing number of samples. This can be
attributed to a few factors such as: (a) an increased distinction between the
distributions and (b) the average value of the distances are shifted with an
increased number of available samples, removing skewness in the distribution.

Table 3: Mean and Standard Deviation of Statistical Distances of The Entire Test Set (CVM: Cramer von Mises, AD: Anderson-Darling, KS: Kolmogorov-Smirnov, WS: Wasserstein) | Prediction | CVM | AD | KS | WS
---|---|---|---|---|---
kNN | Correct | 1569.71, 617.60 | 8.577, 3.03 | 0.0193, 0.0043 | 3.192e-05, 1.153e-05
| Incorrect | 5743.45, 2085.75 | 35.35, 11.12 | 0.083, 0.0139 | 1.430e-04, 5.264e-05
Random Forest | Correct | 3780.74, 227.29 | 18.59, 0.97 | 0.0341, 0.0007 | 1.238e-04, 1.875e-05
| Incorrect | 10478.63, 1147.64 | 56.73, 4.78 | 0.1068, 0.0161 | 4.368-04, 6.654e-05
LSTM | Correct | 2744.89, 895.56 | 13.63, 3.26 | 0.0578, 0.0034 | 4.356e-05, 2.276-05
| Incorrect | 7892.06, 1033.94 | 43.24, 3.23 | 0.1772, 0.0871 | 2.134e-04, 1.033e-04
Figure 2: Statistical Distance Over Varying Sampling Sizes

###  4.2 Experiment Results

Following the process workflow presented in Sec. 3.1, each stage produced its
corresponding values after being executed on ”Town 1” standard map from CARLA.
In the Acquisition stage, Power Analysis was used on each of the driver
profiles. The highest number of samples returned was 91. Multiplying this by
an additional factor of 1.3 yields a final number of samples at 120, which
aligns with our sampling batches; the operational samples were collected in
batches over 4 seconds with a simulation resolution of 30 frames per second.
The performance of the trained model is shown in Tab. 2, where the kNN model
was used in the evaluation of the results due to its simplicity and high
reported performance. The resulting threshold values for SafeML are shown in
Tab. 4.

Table 4: Threshold Parameters Used for Town 1 (CVM: Cramer von Mises, AD: Anderson-Darling, KS: Kolmogorov-Smirnov, WS: Wasserstein) Prediction | CVM | AD | KS | WS
---|---|---|---|---
Mean | 387.83 | 9.64 | 0.087 | 1.38e-4
Standard Deviation | 171.57 | 3.61 | 0.02 | 6.22e-5

The acceptable performance of the ML-model is a design decision which is
obtained from the application requirements specified. In our example, let us
consider the correctness over a batch. Since each batch contains multiple
frames, let us assume a batch is considered correctly classified if its
overall accuracy is 0.8 (96 correct points out of 120). Consequently, a batch
is assumed to be incorrectly classified if its overall accuracy is 0 (focusing
on worst-case scenarios), where all of its members are misclassified. This
high limit was chosen to represent the extreme scenario that minimizes the
number of false alarms.

The performance of each of the distance measures in SafeML was evaluated on
different driver profiles as shown in Figs. 3 and 4, where the true positive
rate (batches with 0 accuracy that were above the threshold) and the false
positive rate (batches with 0.8 accuracy that were above the threshold) were
plotted over a varying increase in the threshold using steps of 0.1 of the
standard deviation.

Figure 3: SafeML performance on Town 1 with Moderate Driver Profiles

Fig. 3 shows the factor of standard deviation by which the threshold should be
increased to yield reliable identification by SafeML. The plot compares
incorrect (i.e. false positive rate) versus correct SafeML alarms (true
positive rate), set to a threshold of 0.8 (as mentioned previously, this
threshold can be decided based on application-level requirements). Through
this method, a suitable factor for the distance measures was found, with the
exception of Kolmogorov Smirnov, where a similar percentage of false positive
rate was achieved for the distance measures.

The same process was repeated for the dangerous driver profile in Fig. 4,
where similar plot curves were observed, and the threshold points can be
established following similar steps as per the moderate profile. However, the
performance ratio between true and false positive rate is exceptionally worse.
The experiment was repeated on ”Town 2” and ”Town 4” with similar results.

Figure 4: SafeML performance on Town 1 With Dangerous Driver Profiles

Repeating the process workflow on the GTSRB shows quite a similar trend where
the correct and incorrect classification are completely separable by setting a
suitable distance threshold as shown in Fig. 5. The number of samples (where
each sample is an image) required can be seen on x-axis. In this case, the
majority of incorrect classifications represent an out-of-scope class. The
distance was calculated using features derived from the last layer of the CNN,
instead of the raw pixels.

Figure 5: Statistical Distance Over Varying Sampling Sizes for GTSRB

##  5 Conclusion and Future Work

In this paper, we have addressed the challenge of determining sampling and
distance thresholds for SafeML, a model-agnostic, assessment tool for scope
compliance. Our approach incorporates power sampling during the development
stage of the subject ML model, to determine the number of samples necessary to
achieve sufficient statistical power while applying the SafeML distance
evaluation during the runtime stage. Furthermore, we have proposed means of
identifying appropriate distance thresholds, based on the observed performance
of the ML model during development-time simulation. We validated our approach
experimentally, using a scenario developed in the CARLA automotive simulator
as well as the publicly available GTSRB dataset.

Apart from the SafeML applications discussed earlier in Sec. 2, at the time of
writing, additional examples are underway, such as investing SafeML towards
cancer detection via x-ray imaging, pedestrian detection, financial
investment, and on predictive maintenance.

Regarding future work, we are considering further directions to improve
SafeML, including investigating the effect of outlier data, the effect of
dataset characteristics (per [22]), using dimensionality reduction, accounting
for uncertainty in the dataset labels (per [21]), and expanding the scope
towards graph, quantum, and time-series datasets.

## Code Availability

Regarding the research reproducibility, codes and functions supporting this
paper are published online at: https://tinyurl.com/4a76z2xs

## Acknowledgements

This work was supported by the Secure and Safe Multi-Robot Systems (SESAME)
H2020 Project under Grant Agreement 101017258 and the German Federal Ministry
for Economic Affairs and Climate Action (BMWK) within the research project
“FabOS” under grant 01MK20010A.

## References

  * [1] Aslansefat, K., Kabir, S., Abdullatif, A., Vasudevan, V., Papadopoulos, Y.: Toward improving confidence in autonomous vehicle software: A study on traffic sign recognition systems. Computer 54(8), 66–76 (2021)
  * [2] Aslansefat, K., Sorokos, I., Whiting, D., Tavakoli Kolagari, R., Papadopoulos, Y.: Safeml: Safety monitoring of machine learning classifiers through statistical difference measures. In: Zeller, M., Höfig, K. (eds.) Model-Based Safety and Assessment. pp. 197–211. Springer International Publishing, Cham (2020)
  * [3] Cheng, C.H., Huang, C.H., Nührenberg, G.: nn-dependability-kit: Engineering neural networks for safety-critical autonomous driving systems. In: Int. Conf. on Computer-Aided Design (ICCAD). pp. 1–6. IEEE (2019)
  * [4] Cohen, J.: A power primer. Psychological bulletin 112(1), 155 (1992)
  * [5] Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., Koltun, V.: CARLA: An open urban driving simulator. In: 1st Annual Conference on Robot Learning (2017)
  * [6] Duan, J., Zeng, J., Zhang, D.: A method for determination on hmm distance threshold. In: 2009 Sixth International Conference on Fuzzy Systems and Knowledge Discovery. vol. 1, pp. 387–391 (2009). https://doi.org/10.1109/FSKD.2009.732
  * [7] Ellis, P.D.: The Essential Guide to Effect Sizes: Statistical Power, Meta-Analysis, and the Interpretation of Research Results. Cambridge University Press (2010). https://doi.org/10.1017/CBO9780511761676
  * [8] Evans, D.L., Drew, J.H., Leemis, L.M.: The distribution of the kolmogorov–smirnov, cramer–von mises, and anderson–darling test statistics for exponential populations with estimated parameters. In: Computational probability applications, pp. 165–190. Springer (2017)
  * [9] Fischer, M., Balunovic, M., Drachsler-Cohen, D., Gehr, T., Zhang, C., Vechev, M.: Dl2: training and querying neural networks with logic. In: International Conference on Machine Learning. pp. 1931–1941. PMLR (2019)
  * [10] Gehr, T., Mirman, M., Drachsler-Cohen, D., Tsankov, P., Chaudhuri, S., Vechev, M.: Ai2: Safety and robustness certification of neural networks with abstract interpretation. In: Symposium on Security and Privacy (SP). IEEE (2018)
  * [11] Gerasimou, S., Eniser, H.F., Sen, A., Cakan, A.: Importance-driven deep learning system testing. In: 42nd Int. Conf. on Software Engineering (ICSE). IEEE (2020)
  * [12] Gros, T.P., Hermanns, H., Hoffmann, J., Klauck, M., Steinmetz, M.: Deep statistical model checking. In: Gotsman, A., Sokolova, A. (eds.) Formal Techniques for Distributed Objects, Components, and Systems. pp. 96–114. Springer International Publishing, Cham (2020)
  * [13] Jöckel, L., Kläs, M.: Increasing trust in data-driven model validation. In: International Conference on Computer Safety, Reliability, and Security. pp. 155–164. Springer (2019)
  * [14] Jöckel, L., Kläs, M., Martínez-Fernández, S.: Safe traffic sign recognition through data augmentation for autonomous vehicles software. In: 2019 IEEE 19th International Conference on Software Quality, Reliability and Security Companion (QRS-C). pp. 540–541. IEEE (2019)
  * [15] Kläs, M., Jöckel, L.: A framework for building uncertainty wrappers for ai/ml-based data-driven components. In: International Conference on Computer Safety, Reliability, and Security. pp. 315–327. Springer (2020)
  * [16] Kläs, M., Sembach, L.: Uncertainty wrappers for data-driven models. In: International Conference on Computer Safety, Reliability, and Security. pp. 358–364. Springer (2019)
  * [17] Lee, K., Lee, H., Lee, K., Shin, J.: Training confidence-calibrated classifiers for detecting out-of-distribution samples. In: International Conference on Learning Representations (2018)
  * [18] Mirman, M., Gehr, T., Vechev, M.: Differentiable abstract interpretation for provably robust neural networks. In: Int. Conf. on Machine Learning. PMLR (2018)
  * [19] Mirman, M., Singh, G., Vechev, M.: A provable defense for deep residual networks. arXiv preprint arXiv:1903.12519 (2019)
  * [20] Müller, M.N., Makarchuk, G., Singh, G., Püschel, M., Vechev, M.: Prima: Precise and general neural network certification via multi-neuron convex relaxations. arXiv preprint arXiv:2103.03638 (2021)
  * [21] Northcutt, C.G., Jiang, L., Chuang, I.L.: Confident learning: Estimating uncertainty in dataset labels. Journal of Artificial Intelligence Research (JAIR) 70, 1373–1411 (2021)
  * [22] Oreski, D., Oreski, S., Klicek, B.: Effects of dataset characteristics on the performance of feature selection techniques. Applied Soft Computing 52, 109–119 (2017)
  * [23] Paterson, C., Calinescu, R., Picardi, C.: Detection and mitigation of rare subclasses in deep neural network classifiers. In: 2021 IEEE International Conference On Artificial Intelligence Testing (AITest). pp. 9–16. IEEE Computer Society, Los Alamitos, CA, USA (aug 2021). https://doi.org/10.1109/AITEST52744.2021.00012, https://doi.ieeecomputersociety.org/10.1109/AITEST52744.2021.00012
  * [24] Ramdas, A., Trillos, N.G., Cuturi, M.: On wasserstein two-sample testing and related families of nonparametric tests. Entropy 19(2), 47 (2017)
  * [25] Rausch, A., Sedeh, A.M., Zhang, M.: Autoencoder-based semantic novelty detection: Towards dependable ai-based systems. Applied Sciences 11(21) (2021). https://doi.org/10.3390/app11219881
  * [26] Ruoss, A., Baader, M., Balunović, M., Vechev, M.: Efficient certification of spatial robustness. arXiv preprint arXiv:2009.09318 (2020)
  * [27] Sharafaldin, I., Lashkari, A.H., Ghorbani, A.A.: Toward generating a new intrusion detection dataset and intrusion traffic characterization. ICISSp 1, 108–116 (2018)
  * [28] Singh, G., Gehr, T., Püschel, M., Vechev, M.: An abstract domain for certifying neural networks. Proceedings of the ACM on Programming Languages 3, 1–30 (01 2019). https://doi.org/10.1145/3290354
  * [29] Stallkamp, J., Schlipsing, M., Salmen, J., Igel, C.: Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural Networks (0), – (2012). https://doi.org/10.1016/j.neunet.2012.02.016, http://www.sciencedirect.com/science/article/pii/S0893608012000457
  * [30] Stallkamp, J., Schlipsing, M., Salmen, J., Igel, C.: Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural networks 32, 323–332 (2012)
  * [31] Wicker, M., Huang, X., Kwiatkowska, M.: Feature-guided black-box safety testing of deep neural networks. In: International Conference on Tools and Algorithms for the Construction and Analysis of Systems. pp. 408–426. Springer (2018)
  * [32] Zhao, X., Huang, W., Banks, A., Cox, V., Flynn, D., Schewe, S., Huang, X.: Assessing the reliability of deep learning classifiers through robustness evaluation and operational profiles. arXiv:2106.01258 (2021)
  * [33] Zhao, X., Huang, W., Schewe, S., Dong, Y., Huang, X.: Detecting operational adversarial examples for reliable deep learning. arXiv:2104.06015 (2021)


# Unified thermodynamic–kinetic uncertainty relation

Van Tuan Vo  Department of Information and Communication Engineering, Graduate
School of Information Science and Technology, The University of Tokyo, Tokyo
113-8656, Japan<EMAIL_ADDRESS>Tan Van Vu  Department of Physics,
Keio University, Yokohama 223-8522, Japan<EMAIL_ADDRESS>Yoshihiko
Hasegawa  Department of Information and Communication Engineering, Graduate
School of Information Science and Technology, The University of Tokyo, Tokyo
113-8656, Japan<EMAIL_ADDRESS>
###### Abstract

Understanding current fluctuations is of fundamental importance and paves the
way for the development of practical applications. According to the
thermodynamic and kinetic uncertainty relations, the precision of currents can
be constrained solely by total entropy production or dynamical activity. In
this study, we derive a tighter bound on the precision of currents in terms of
both thermodynamic and kinetic quantities, demonstrating that these quantities
jointly constrain current fluctuations. The thermodynamic and kinetic
uncertainty relations become particular cases of our result in asymptotic
limits. Intriguingly, the unified thermodynamic–kinetic uncertainty relation
leads to a tighter classical speed limit, refining the time constraint on the
system’s state transformation. The proposed framework can be extended to apply
to state observables and systems with unidirectional transitions, thereby
providing a constraint on the precision of the first-passage time.

##  1 Introduction

Universal relations that characterize the fluctuations of nonequilibrium
systems have received considerable interest in the literature. A prominent
class of inequalities with these characteristics is the thermodynamic
uncertainty relation (TUR), which was initially developed for classical
systems [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] (see Ref. [17]
for a review) and subsequently extended to open quantum systems [18, 11, 19,
20, 21, 22]. The TUR imposes an upper bound on the precision of time-
integrated currents in terms of irreversible entropy production, indicating
that increasing the accuracy of currents pays a price in dissipation.
Furthermore, the kinetic uncertainty relation (KUR), which is similar but
different from the TUR, imposes another upper bound on the precision of the
generic counting observables in terms of the dynamical activity [23, 24, 25].
These relations are not only theoretically important but also practically
relevant; they can be applied to the thermodynamic inference of dissipation
even in systems with hidden degrees of freedom [26, 27, 28, 29].

The TUR and KUR have complementary roles, and there is no hierarchical
relationship between them. For example, the TUR provides a more precise bound
than the KUR when the system is close to equilibrium and the irreversible
entropy production is sufficiently smaller than the dynamical activity. In
contrast, the KUR may outperform the TUR for far-from-equilibrium systems.
References [30, 31] provide a perspective that the interpolated bounds of the
TUR and KUR can be obtained by interpreting a bidirectional transition as two
unidirectional transitions. Nevertheless, it is important to investigate
whether there exists an improved bound that incorporates both irreversible
entropy production and dynamical activity to constrain the precision of
currents.

Irreversible entropy production and dynamical activity are dissipative and
frenetic terms, respectively, and thus represent two different facets of
system dynamics [32]. Entropy production, which is the signature of
nonequilibrium processes, quantifies the degree of time-reversal symmetry
breaking [33]. In contrast, dynamical activity, quantified by the average
number of jumps between system states, is time-symmetric and characterizes the
timescale of systems [34, 35, 36, 32]. Notably, these two quantities are
relevant to speed limits, where they jointly constrain the speed of state
transformation in both classical and quantum systems [37, 38, 12, 39, 40, 41,
42, 43, 44]. In Ref. [45], it was demonstrated that the classical speed limit
and a generalized TUR have the same origin. This close connection between the
speed limits and TUR strongly suggests that both entropy production and
dynamical activity may simultaneously constrain the precision of currents.

In this paper, we consider discrete-state systems modeled by Markov jump
processes and derive a unified bound of the thermodynamic and kinetic
uncertainty relation (hereinafter referred to as the unified TKUR) for
arbitrary time-integrated currents. The upper bound of the precision consists
only of entropy production and dynamical activity, indicating that the
thermodynamic and kinetic costs both jointly constrain the fluctuation of
currents. Moreover, it is always stronger than the TUR and KUR, thus allowing
for a more accurate TUR-based inference of dissipation. When the ratio of
entropy production to dynamical activity approaches zero or infinity, the
obtained relation reduces exactly to the TUR or The unified TKUR is universal
and valid for arbitrary time-dependent driving systems. Notably, a tight
classical speed limit can be obtained as a corollary of our results. The
fluctuation of currents in the short-time limit characterizes the
instantaneous change in the system distribution. Taking the time integral of
the short-time unified TKUR yields a classical speed limit, which is tighter
than the bound reported in Ref. [37] (see Fig. 1 for illustration). The
unified TKUR can be extended to systems with unidirectional transitions and
can be applied to state observables, such as first-passage times.

Figure 1: Schematic of the relation between the unified thermodynamic–kinetic
uncertainty relation (TKUR) and classical speed limit. According to the
unified TKUR, the precision
${\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}/{\operatorname{Var}\left[\mathcal{J}\right]}$
of a current $\mathcal{J}$ is constrained by both the total entropy production
$\Sigma_{\tau}$ and the dynamical activity $\mathcal{A}_{\tau}$. In the short-
time limit, the precision characterizes instantaneous changes in the system
distribution. Taking the time integral of the short-time unified TKUR yields a
tight classical speed limit.

##  2 Setup

We consider a system described by a discrete-state continuous-time Markov jump
process. The system is controlled by an arbitrary protocol
$\lambda_{t}=\lambda(vt)$ with speed parameter $v$. The time evolution of the
dynamics is governed by the master equation

$\displaystyle\dot{p}_{n}(t,v)=\sum_{m}p_{m}(t,v)R_{nm}(\lambda_{t}),$ (1)

where $p_{n}(t,v)$ is the probability of finding the system in state $n$ at
time $t$ with the speed parameter $v$, and $R_{mn}(\lambda_{t})$ is the
transition rate from state $n$ to state $m$ controlled by the protocol
$\lambda_{t}$. The transition rate satisfies the normalization condition
$\sum_{m}R_{mn}(\lambda_{t})=0$ and non-negativity condition
$R_{mn}(\lambda_{t})\geq 0$ for $n\neq m$. We assume that the transition rates
satisfy the local detailed balance condition, which allows us to identify the
entropy flow into the environment. In the framework of stochastic
thermodynamics, the entropy production rate associated with the transition
between $n$ and $m$ is defined as follows [33]:

$\displaystyle\sigma_{nm}(t,v)=j_{nm}(t,v)\ln\frac{p_{m}(t,v)R_{nm}(\lambda_{t})}{p_{n}(t,v)R_{mn}(\lambda_{t})}.$
(2)

where $j_{nm}(t,v)\equiv
p_{m}(t,v)R_{nm}(\lambda_{t})-p_{n}(t,v)R_{mn}(\lambda_{t})$ is the
probability current from state $m$ to state $n$.

Let $\omega_{\tau}=\\{n_{0},(n_{1},t_{1}),\dots,(n_{N},t_{N})\\}$ be a
stochastic trajectory of the system during the time interval $[0,\tau]$, where
the system is initially at state $n_{0}$ and a transition from state $n_{i-1}$
to state $n_{i}$ occurs at time $t_{i}$ for each $1\leq i\leq N$. For each
trajectory, we consider a generic time-integrated current
$\mathcal{J}(\omega)\equiv\sum_{i=1}^{N}d_{n_{i}n_{i-1}}$, where the increment
$d_{mn}$ associated with transition $n\rightarrow m$ is anti-symmetric,
$d_{mn}=-d_{nm}$. By selecting the increments appropriately, the current will
correspond to a relevant thermodynamic quantity. For instance, $\mathcal{J}$
becomes either the stochastic entropy production current for
$d_{nm}=\ln\frac{p_{m}(t,v)R_{nm}(\lambda_{t})}{p_{n}(t,v)R_{mn}(\lambda_{t})}$
or the heat flux into the environment for
$d_{nm}=\ln\frac{R_{nm}(\lambda_{t})}{R_{mn}(\lambda_{t})}$. In this time
interval, the total entropy production is given by

$\displaystyle\Sigma_{\tau}\equiv\int_{0}^{\tau}dt\sum_{n<m}\sigma_{nm}(t,v)=\int_{0}^{\tau}dt\sigma_{t},$
(3)

where the entropy production rate is defined as
$\sigma_{t}\equiv\sum_{n<m}\sigma_{nm}(t,v)$. The TUR connects the total
entropy production with the precision of the time-integrated current as
follows [46]:

$\displaystyle\frac{\Sigma_{\tau}}{2}\geq\frac{\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{J}\right]}.$
(4)

Here, $\nabla\equiv\tau\partial_{\tau}-v\partial_{v}$ is a differential
operator, and $\mathbb{E}\left[{\bullet}\right]$ and
$\operatorname{Var}\left[\bullet\right]$ denote the ensemble average and
variance of the current, respectively. The term
$\nabla\mathbb{E}\left[{\mathcal{J}}\right]$ represents the response of the
average current to changes in the operational time and speed of the control
protocol. Although the TUR has a wide range of applicability, it is not tight
for discrete-state systems [28, 29]. This suggests that the total entropy
production is not sufficient to characterize the current fluctuation.

To describe far-from-equilibrium systems, non-dissipative aspects must also be
taken into account [47]. One such quantity is the dynamical activity, which is
the expected number of transitions between states. The dynamical activity is
given by

$\displaystyle\mathcal{A}_{\tau}\equiv\int_{0}^{\tau}dt\sum_{n<m}a_{nm}(t,v)=\int_{0}^{\tau}dt\,a_{t},$
(5)

where $a_{nm}(t,v)\equiv
p_{m}(t,v)R_{nm}(\lambda_{t})+p_{n}(t,v)R_{mn}(\lambda_{t})$ denotes the jump
frequency between two states $m$ and $n$, and
$a_{t}\equiv\sum_{n<m}a_{nm}(t,v)$. For arbitrary time-dependent driven
systems, the KUR implies that the precision of currents is upper bounded by
the dynamical activity [46],

$\displaystyle\mathcal{A}_{\tau}\geq\frac{\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{J}\right]}.$
(6)

Although we focus exclusively on generic time-integrated currents in this
study, the KUR is applicable to generic counting observables.

At the transition level, we find that the probability current can be expressed
in terms of the dynamical activity rate and entropy production rate (see A):

$\displaystyle\frac{j_{nm}^{2}(t,v)}{a_{nm}(t,v)}=\frac{\sigma_{nm}^{2}(t,v)}{4a_{nm}(t,v)}f\left({\frac{\sigma_{nm}(t,v)}{2a_{nm}(t,v)}}\right)^{-2},$
(7)

where $f(x)$ is the inverse of the function $x\tanh(x)$. This provides a
generic relation between the dynamical activity and entropy production. We
define the pseudo–entropy production, which is an empirical measure of
irreversibility, as follows:

$\displaystyle{\Sigma_{\tau}^{\rm ps}}\equiv
2\int_{0}^{\tau}dt\sum_{n<m}\frac{j_{nm}(t,v)^{2}}{a_{nm}(t,v)}.$ (8)

In the overdamped Langevin limit, the pseudo–entropy production reduces to the
total entropy production [48]. However, in contrast to the total entropy
production, the pseudo–entropy production takes a finite value even when there
exist unidirectional transitions between states. The pseudo–entropy production
has been proven useful in deriving TURs for steady-state and periodically
driven systems [48, 49, 50]. Note that the function $x^{2}/yf({x/y})^{-2}$ is
a concave function for $x,y>0$. Using Eq. (7) and applying Jensen’s
inequality, we can calculate

$\displaystyle\Sigma_{\tau}^{\rm ps}$
$\displaystyle=\int_{0}^{\tau}dt\sum_{n<m}\frac{\sigma_{nm}^{2}(t,v)}{2a_{nm}(t,v)}f\left({\frac{\sigma_{nm}(t,v)}{2a_{nm}(t,v)}}\right)^{-2}$
(9)
$\displaystyle\leq\frac{\left[{\int_{0}^{\tau}dt\sum_{n<m}\sigma_{nm}(t,v)}\right]^{2}}{2{\int_{0}^{\tau}dt\sum_{n<m}a_{nm}(t,v)}}f\left({\frac{\int_{0}^{\tau}dt\sum_{n<m}\sigma_{nm}(t,v)}{2\int_{0}^{\tau}dt\sum_{n<m}a_{nm}(t,v)}}\right)^{-2},$

which yields an upper bound for $\Sigma_{\tau}^{\rm ps}$ in terms of the total
entropy production and dynamical activity, as follows:

$\displaystyle{\Sigma_{\tau}^{\rm
ps}}\leq\frac{\Sigma_{\tau}^{2}}{2\mathcal{A}_{\tau}}f\left({\frac{\Sigma_{\tau}}{2\mathcal{A}_{\tau}}}\right)^{-2}.$
(10)

In the following section, we use Eq. (10) to derive a tight bound on the
precision of currents for systems under time-dependent driving.

##  3 Unified thermodynamic–kinetic uncertainty relation

We consider an auxiliary system that evolves at a slightly different speed
with the same control protocol. The auxiliary density is obtained by rescaling
the time $t\rightarrow(1+\theta)t$, and modifying the speed parameter
$v\rightarrow v/(1+\theta)$ [46]:

$\displaystyle\tilde{p}_{n}(t,v)=p_{n}((1+\theta)t,v/(1+\theta)),$ (11)

where $\theta$ is the perturbation parameter, and the tilde represents the
auxiliary dynamics. The auxiliary dynamics is described by the following
master equation:

$\displaystyle\dot{\tilde{p}}_{n}(t,v)=\sum_{m}\tilde{j}_{nm}(t,v),$ (12)

with the auxiliary probability current
$\tilde{j}_{nm}(t,v)\equiv\tilde{p}_{m}(t,v)\tilde{R}_{nm}({\lambda}_{t})-\tilde{p}_{n}(t,v)\tilde{R}_{mn}({\lambda}_{t})$.
According to the Cramér–Rao inequality, the ensemble average and variance of
the time-integrated current in the auxiliary dynamics satisfy

$\displaystyle\mathcal{I}(\theta)\geq\frac{\left({\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{J}}\right]}\right)^{2}}{\tilde{\operatorname{Var}}\left[\mathcal{J}\right]},$
(13)

where $\partial_{\theta}\equiv\frac{\partial}{\partial\theta}$ denotes the
partial derivative with respect to $\theta$, and
$\mathcal{I}(\theta)\equiv-\tilde{\mathbb{E}}\left[{\partial_{\theta}^{2}\ln\tilde{\mathbb{P}}(\omega)}\right]$
denotes the Fisher information with the path probability distribution
$\tilde{\mathbb{P}}(\omega)$. This inequality implies that the information
about $\theta$ obtained by measuring the current is less than the Fisher
information.

Next, we consider the case in which the perturbation parameter $\theta$ is
equal to zero. We demonstrate that each term in Eq. (13) is reducible to the
relevant physical quantity, under the assumption that the auxiliary
probability current satisfies

$\displaystyle\tilde{j}_{nm}(t,v)$
$\displaystyle=(1+\theta)j_{nm}((1+\theta)t,v/(1+\theta)).$ (14)

In B, it has been shown that the pseudo–entropy production is twice the
minimum Fisher information for all possible auxiliary transition rates. This
signifies that there exists an optimal choice of the auxiliary transition rate
such that

$\displaystyle\mathcal{I}(0)=\frac{1}{2}\Sigma_{\tau}^{\rm ps}.$ (15)

It should be noted that other derivations of the TUR and KUR have also
attempted to find upper bounds of $\mathcal{I}(0)$ in terms of the total
entropy production of dynamical activity. However, without considering the
minimum Fisher information, the bounds are not tight, as demonstrated later.
The partial derivative of the ensemble average of the time-integrated current
at $\theta=0$ is as follows (see C):

$\displaystyle\left.\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{J}}\right]\right|_{\theta=0}=\nabla\mathbb{E}\left[{\mathcal{J}}\right].$
(16)

Since the auxiliary dynamics is reduced to the original dynamics when the
perturbation parameter $\theta$ is equal to zero, we have

$\displaystyle\left.\tilde{\operatorname{Var}}\left[\mathcal{J}\right]\right|_{\theta=0}=\operatorname{Var}\left[\mathcal{J}\right].$
(17)

Therefore, with the optimal auxiliary transition rate, Eq. (13) can be
rewritten as

$\displaystyle\frac{1}{2}\Sigma_{\tau}^{\rm
ps}\geq\frac{\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{J}\right]}.$
(18)

Combining with Eq. (10), we obtain a trade-off between the precision and the
thermodynamic and kinetic costs:

$\displaystyle\mathcal{C}\equiv\frac{\Sigma_{\tau}^{2}}{4\mathcal{A}_{\tau}}f\left({\frac{\Sigma_{\tau}}{2\mathcal{A}_{\tau}}}\right)^{-2}\geq\frac{\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{J}\right]}.$
(19)

We refer to Eq. (19) as the unified TKUR, which is the central result of this
paper. Several remarks are in order. First, the unified TKUR is always
stronger than the TUR and KUR since
$\mathcal{C}\leq\min\\{\Sigma_{\tau}/2,\mathcal{A}_{\tau}\\}$. For
$\Sigma_{\tau}/\mathcal{A}_{\tau}\gg 1$, it is reduced to the KUR, while for
$\Sigma_{\tau}/\mathcal{A}_{\tau}\ll 1$, it reduces to the TUR. We numerically
illustrate that the unified TKUR provides the best estimate of the precision
of a random observable in a three-state Markov jump process in Fig. 2(b).
Second, since $\mathcal{C}<\min\\{\Sigma_{\tau}/2,\mathcal{A}_{\tau}\\}$ when
$\Sigma_{\tau}$ and $\mathcal{A}_{\tau}$ are positive and finite, our bound
implies that equality of the TUR and KUR cannot be achieved in discrete-state
systems, which is in agreement with the results of Refs. [28, 29]. In E, we
prove that the equality condition for our relation is always satisfied for a
one-dimensional biased random walk. Third, the unified TKUR covers all use
cases of the TUR, but cannot be utilized for generic counting observables like
the KUR [23]. Finally, this relation is universal and can be extended to the
cases of state observables, multidimensional control protocols, unidirectional
transitions, multipartite processes, and Markovian open quantum systems.

Figure 2: (a) Schematic diagram of a three-state Markov jump process with
fully connected states. (b) Performance of the thermodynamic uncertainty
relation (TUR), kinetic uncertainty relation (KUR) and the unified
thermodynamic–kinetic uncertainty relation (TKUR) as upper bounds on the
precision
${\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}/{\operatorname{Var}\left[\mathcal{J}\right]}$.
The transition rates between two states $m$ and $n$ are selected as
$R_{mn}(\lambda_{t})=10^{2}\exp\\{-\mu_{mn}[f_{0}+vt(f_{1}-f_{0})]\\}$, where
$\mu_{mn}$, $f_{0}$, and $f_{1}$ are randomly selected as
$\mu_{mn},f_{0},f_{1}\in[0,10]$. We consider processes in which the sum of the
entropy production and dynamical activity is approximately equal to $0.1$ for
time interval $\tau\in[0.1,1]$ (i.e.,
$0.1-10^{-3}\leq\Sigma_{\tau}+\mathcal{A}_{\tau}\leq 0.1$). The pink circles
denote the precision where the increment $d_{mn}$ is randomly selected as
$d_{mn}=-d_{nm}\in[-2,2]$ and the speed parameter is set to $v=1$. The upper
bounds of Eqs. (4), (6), and (19) are depicted by blue dot-dashed, orange
dotted, and violet solid lines, respectively.

##  4 Tighter classical speed limit

In what follows, we demonstrate that the classical speed limit is a corollary
of Eq. (19). We consider a system governed by a fixed control protocol in a
short time interval $\left[{t,t+\Delta t}\right]$ when $\Delta t\rightarrow
0$. In this case, the unified TKUR becomes

$\displaystyle\frac{\sigma_{t}^{2}}{4a_{t}}f\left({\frac{\sigma_{t}}{2a_{t}}}\right)^{-2}\geq\lim_{\Delta
t\rightarrow 0}\frac{{\mathbb{E}\left[{\mathcal{J}(\omega_{\Delta
t})}\right]}^{2}}{\Delta t\operatorname{Var}\left[\mathcal{J}(\omega_{\Delta
t})\right]},$ (20)

where $\omega_{\Delta t}$ is a trajectory in the time interval $[t,t+\Delta
t]$. We consider the integrated empirical current defined as

$\displaystyle J_{nm}(\omega_{\Delta
t})=\sum_{i=1}^{N}\delta_{n_{i-1},m}\delta_{n_{i},n}-\delta_{n_{i-1},n}\delta_{n_{i},m},$
(21)

which increases by $1$ ($-1$) when there is a jump from $m$ to $n$ ($n$ to
$m$). Here, $\delta_{x,y}$ is the Kronecker delta ($\delta_{x,y}=1$ when $x=y$
and $0$ otherwise). In the short-time limit, the average and variance of the
integrated empirical current are as follows:

$\displaystyle\mathbb{E}\left[{J_{nm}(\omega_{\Delta t})}\right]$
$\displaystyle=\Delta t(p_{m}R_{nm}-p_{n}R_{mn}),$ (22)
$\displaystyle\operatorname{Var}\left[J_{nm}(\omega_{\Delta t})\right]$
$\displaystyle=\Delta t(p_{m}R_{nm}+p_{n}R_{mn}),$ (23)

respectively, to the leading order in $\Delta t$. For simplicity, we omit the
time and speed parameter notations. The time-integrated current is the linear
combination of the empirical currents, $\mathcal{J}(\omega_{\Delta
t})=\sum_{n<m}d_{nm}J_{nm}(\omega_{\Delta t})$. Since all of $J_{nm}$ can be
regarded as mutually independent to the leading order in $\Delta t$, the
average and variance of the time-integrated current can be written as

$\displaystyle\mathbb{E}\left[{\mathcal{J}(\omega_{\Delta t})}\right]$
$\displaystyle=\sum_{n<m}d_{nm}\mathbb{E}\left[{J_{nm}(\omega_{\Delta
t})}\right],$ (24)
$\displaystyle\operatorname{Var}\left[\mathcal{J}(\omega_{\Delta t})\right]$
$\displaystyle=\sum_{n<m}d_{nm}^{2}\operatorname{Var}\left[J_{nm}(\omega_{\Delta
t})\right],$ (25)

respectively. Therefore, by setting the increment to
$d_{nm}=\mathrm{sign}(p_{m}R_{nm}-p_{n}R_{mn})$, the unified TKUR can be
rewritten as follows:

$\displaystyle\frac{\sigma_{t}^{2}}{4a_{t}}f\left({\frac{\sigma_{t}}{2a_{t}}}\right)^{-2}\geq\frac{\left[{\sum_{n<m}\left|{p_{m}R_{nm}-p_{n}R_{mn}}\right|}\right]^{2}}{a_{t}}.$
(26)

Since the function $xf(x/y)^{-1}$ is a concave function for $x,y>0$, we obtain

$\displaystyle\tau\bar{\Sigma}_{\tau}f\left({\frac{\bar{\Sigma}_{\tau}}{2\bar{\mathcal{A}}_{\tau}}}\right)^{-1}\geq
2\int_{0}^{\tau}dt\sum_{n<m}\left|{p_{m}R_{nm}-p_{n}R_{mn}}\right|,$ (27)

where $\bar{\Sigma}_{\tau}\equiv\tau^{-1}\Sigma_{\tau}$ and
$\bar{\mathcal{A}}_{\tau}\equiv\tau^{-1}\mathcal{A}_{\tau}$ are the time
average of the total entropy production and dynamical activity, respectively.
According to the triangle inequality and the master equation, the right-hand
side of Eq. (27) is lower bounded as follows:

$\displaystyle
2\int_{0}^{\tau}dt\sum_{n<m}\left|{p_{m}R_{nm}-p_{n}R_{mn}}\right|$
$\displaystyle\geq\int_{0}^{\tau}dt\sum_{n}\left|{\dot{p}_{n}(t)}\right|$
$\displaystyle\geq\mathcal{L}(\bm{p}(0),\bm{p}(\tau)),$ (28)

where
$\mathcal{L}(\bm{p}(0),\bm{p}(\tau))\equiv\sum_{n}\left|{p_{n}(0)-p_{n}(\tau)}\right|$
denotes the total variation distance between the initial and final
distributions. Equations (27) and (28) directly imply the following classical
speed limit:

$\displaystyle\tau\geq\frac{\mathcal{L}(\bm{p}(0),\bm{p}(\tau))}{\bar{\Sigma}_{\tau}}{{f\left({\frac{\bar{\Sigma}_{\tau}}{2\bar{\mathcal{A}}_{\tau}}}\right)}}\equiv\tau_{1}.$
(29)

Thus, the minimum time required for a system to change from one state to
another is determined by the dynamical activity and total entropy production.
The derivation suggests that the classical speed limit is a consequence of the
short-time unified TKUR. This perspective provides not only insight into the
origin of the classical speed limit but also better constraints on the
operation time. Since $f(x)\geq\operatorname{max}\\{x,\sqrt{x}\\}$ for $x>0$,
we have lower bounds on the derived speed limit:

$\displaystyle\tau_{1}\geq\operatorname{max}\left\\{\tau_{2}\equiv\frac{\mathcal{L}(\bm{p}(0),\bm{p}(\tau))}{\sqrt{2\bar{\mathcal{A}}_{\tau}\bar{\Sigma}_{\tau}}},\tau_{3}\equiv\frac{\mathcal{L}(\bm{p}(0),\bm{p}(\tau))}{{2}\bar{\mathcal{A}}_{\tau}}\right\\}.$
(30)

It is clear that Eq. (29) provides a better constraint on the operation time
than the speed limit $\tau\geq\tau_{2}$ proposed in Ref. [37]. When
$\bar{\Sigma}_{\tau}\leq{2}\bar{\mathcal{A}}_{\tau}$, the bound $\tau_{2}$ is
tighter than the bound $\tau_{3}$. However, if the total entropy production is
relatively large compared to the dynamical activity (i.e.,
$\bar{\Sigma}_{\tau}\gg\bar{\mathcal{A}}_{\tau}$), then $\tau_{2}<\tau_{3}$
and the operation time can be described by $\tau_{3}$. In this limit,
$\tau_{1}$ converges to $\tau_{3}$, and the average dynamical activity
contributes significantly to determining the operation time.

##  5 Unified TKUR for first-passage times

Using the example of the first-passage time to an absorbing state $\rm X$, we
illustrate that our framework can be extended to state observables and systems
with unidirectional transitions. A transition $n\rightarrow m$ is called
unidirectional when its transition rate is positive, $R_{mn}>0$, while the
rate in the reverse direction $m\rightarrow n$ is zero. In contrast, a
transition is called bidirectional when $R_{mn}>0$ and $R_{nm}>0$. We assume
that all transitions are bidirectional except those connected to the absorbing
state $\rm X$. Let $\rm B$ and $\rm U$ denote the set of edges with
bidirectional and unidirectional transitions, respectively. This notation
allows us to decompose the dynamical activity into two components:

$\displaystyle\mathcal{A}_{\tau}^{\rm B/U}$
$\displaystyle\equiv\int_{0}^{\tau}dt\sum_{n<m:(n,m)\in{\rm B/U}}a_{nm}(t,v).$
(31)

On the other hand, entropy production can only be well defined with
bidirectional transitions. In this case, the total entropy production is given
by

$\displaystyle\Sigma_{\tau}^{\rm B}$
$\displaystyle\equiv\int_{0}^{\tau}dt\sum_{n<m:(n,m)\in{\rm
B}}\sigma_{nm}(t,v).$ (32)

From Eq. (7) and the concavity of the function $x^{2}/yf({x/y})^{-2}$, we
obtain an upper bound on the pseudo–entropy production in a system with
unidirectional transitions:

$\displaystyle\Sigma_{\tau}^{\rm ps}\leq\mathcal{A}_{\tau}^{\rm
U}+\frac{(\Sigma_{\tau}^{\rm B})^{2}}{2\mathcal{A}_{\tau}^{\rm
B}}f\left({\frac{\Sigma_{\tau}^{\rm B}}{2\mathcal{A}_{\tau}^{\rm
B}}}\right)^{-2}.$ (33)

For a given trajectory $\omega$, the survival time before the system reaches
the absorbing state $X$ is defined as $\mathcal{T}(\omega)\equiv\sum_{n\neq
X}\tau_{n}(\omega)$, where $\tau_{n}(\omega)$ is the total time that the
system remains in state $n$ in trajectory $\omega$. Since
$\mathcal{T}(\omega)$ is a state observable, the partial derivative of its
ensemble average in the auxiliary dynamics reads (see D)

$\displaystyle\left.\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{T}}\right]\right|_{\theta=0}=(\nabla-1)\mathbb{E}\left[{\mathcal{T}}\right].$
(34)

According to the Cramér–Rao inequality, the pseudo–entropy production is then
lower bounded by

$\displaystyle\Sigma_{\tau}^{\rm
ps}\geq\frac{\left[{(\nabla-1)\mathbb{E}\left[{\mathcal{T}}\right]}\right]^{2}}{\operatorname{Var}\left[\mathcal{T}\right]}.$
(35)

Thus, an extended version of the unified TKUR for the state observable
$\mathcal{T}$ takes the form

$\displaystyle\mathcal{A}_{\tau}^{\rm U}+\frac{(\Sigma_{\tau}^{\rm
B})^{2}}{2\mathcal{A}_{\tau}^{\rm B}}f\left({\frac{\Sigma_{\tau}^{\rm
B}}{2\mathcal{A}_{\tau}^{\rm
B}}}\right)^{-2}\geq\frac{\left[{(\nabla-1)\mathbb{E}\left[{\mathcal{T}}\right]}\right]^{2}}{\operatorname{Var}\left[\mathcal{T}\right]}.$
(36)

Note that this relation can be optimized by considering a pair of
bidirectional transitions to be two unidirectional transitions [31].

Next, we consider the case of relaxation where the control parameters are
constant and the observation time is infinite. In this scenario,
$\mathcal{T}(\omega)$ and
$\partial_{\tau}\mathbb{E}\left[{\mathcal{T}}\right]$ are the first-passage
time and the survival probability, respectively. Since the survival
probability decays exponentially,
$\tau\partial_{\tau}\mathbb{E}\left[{\mathcal{T}}\right]$ vanishes as
$\tau\rightarrow\infty$ [51, 31]. Once the system reaches the absorbing state,
the system state remains unchanged, resulting in
$\lim_{\tau\to\infty}\mathcal{A}_{\tau}^{\rm U}=1$,
$\lim_{\tau\to\infty}\mathcal{A}_{\tau}^{\rm B}=\mathcal{A}_{\infty}^{\rm B}$
and $\lim_{\tau\to\infty}\Sigma_{\tau}^{\rm B}=\Sigma_{\infty}^{\rm B}$.
Recasting Eq. (36), we obtain the unified TKUR for first-passage times:

$\displaystyle 1+\frac{(\Sigma_{\infty}^{\rm
B})^{2}}{2\mathcal{A}_{\infty}^{\rm B}}f\left({\frac{\Sigma_{\infty}^{\rm
B}}{2\mathcal{A}_{\infty}^{\rm
B}}}\right)^{-2}\geq\frac{\left({\mathbb{E}\left[{\mathcal{T}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{T}\right]}.$
(37)

Thus, the precision of the first-passage time is constrained by the dynamical
activity and total entropy production of the subsystem omitting the absorbing
state. Note that this bound is stricter than the thermodynamic and kinetic
bounds presented in Refs. [31, 25].

##  6 Concluding perspective

In this paper, we provide a unified perspective on the TUR, KUR, and speed
limits. We establish a tight bound on the precision of a current using the
total entropy production and dynamical activity. Our results illustrate the
cooperative role of kinetic and thermodynamic contributions in constraining
the precision of currents. The unified TKUR offers a rigorous tool for
thermodynamic inference in time-dependent driving systems. This relation also
provides insight that the classical speed limit can be derived from the
uncertainty relation. This is similar to the quantum case, in which one of the
interpretations of Heisenberg’s uncertainty principle is the quantum speed
limit [52]. Since quantum and classical speed limits are closely related [53],
the results suggest that there may be a universal relation that unifies
Heisenberg’s uncertainty principle and the TUR.

## Acknowledgments

This work was supported by the Ministry of Education, Culture, Sports,
Science, and Technology (MEXT) KAKENHI Grant No. JP19K12153 and JP22H03659.

##  Appendix A Derivation of Eq. (7)

For arbitrary positive real numbers $\alpha$ and $\beta$, the following
equation holds:

$\displaystyle\tanh\left({\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)}\right)$
$\displaystyle=\frac{\alpha-\beta}{\alpha+\beta}.$ (38)

Multiplying both sides by $\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)$,
we obtain

$\displaystyle\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)\tanh\left({\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)}\right)$
$\displaystyle=\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)\frac{\alpha-\beta}{\alpha+\beta}.$
(39)

Applying the function $f(x)$, which is the inverse of the function
$x\tanh(x)$, yields

$\displaystyle\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)$
$\displaystyle=f\left({\frac{1}{2}\ln\left({\frac{\alpha}{\beta}}\right)\frac{\alpha-\beta}{\alpha+\beta}}\right),$
(40) $\displaystyle 1$
$\displaystyle=\frac{\left[{\ln\left({\frac{\alpha}{\beta}}\right)}\right]^{2}}{4}f\left({\frac{(\alpha-\beta)\ln\left({\frac{\alpha}{\beta}}\right)}{2(\alpha+\beta)}}\right)^{-2}.$
(41)

This leads to the following key relation:

$\displaystyle\frac{\left({\alpha-\beta}\right)^{2}}{\alpha+\beta}$
$\displaystyle=\frac{\left[{(\alpha-\beta)\ln\left({\frac{\alpha}{\beta}}\right)}\right]^{2}}{4\left({\alpha+\beta}\right)}f\left({\frac{(\alpha-\beta)\ln\left({\frac{\alpha}{\beta}}\right)}{2(\alpha+\beta)}}\right)^{-2}.$
(42)

Substituting $\alpha=p_{m}(t,v)R_{nm}\left(\lambda_{t}\right)$ and
$\beta=p_{n}(t,v)R_{mn}\left(\lambda_{t}\right)$ into Eq. (42), we obtain the
following identity:

$\displaystyle\frac{j_{nm}^{2}(t,v)}{a_{nm}(t,v)}=\frac{\sigma_{nm}^{2}(t,v)}{4a_{nm}(t,v)}f\left({\frac{\sigma_{nm}(t,v)}{2a_{nm}(t,v)}}\right)^{-2}.$
(43)

##  Appendix B Pseudo–entropy production and Fisher information

During the time interval $[0,\tau]$, the system evolves along a trajectory
$\omega_{\tau}=\\{n_{0},(n_{1},t_{1}),\dots,(n_{N},t_{N})\\}$, where the
system is initially in state $n_{0}$, and a transition from state $n_{i-1}$ to
state$n_{i}$ occurs at time $t_{i}$ for each $1\leq i\leq N$. Let
$p_{n_{0}}(0)$ denote the initial probability distribution of the system. The
probability density of observing the trajectory $\omega$ is given by

$\displaystyle\mathbb{P}[\omega_{\tau}]\equiv\exp\left({\int_{0}^{\tau}dt\sum_{n}\chi_{n}(t)R_{nn}(\lambda_{t})+\sum_{n\neq
m}\eta_{nm}(t)\ln R_{nm}(\lambda_{t})}\right)p_{n_{0}}(0),$ (44)

where $\chi_{n}(t)\equiv\sum_{i=1}^{N}\delta_{n_{i},n}\delta_{t_{i},t}$,
$\eta_{nm}(t)\equiv\sum_{i=1}^{N}\delta_{n_{i-1},m}\delta_{n_{i},n}\delta_{t_{i},t}$.
From the definition, the average of all possible trajectories of $\chi_{n}(t)$
is the probability of finding the system in state $n$ at time $t$, given by

$\displaystyle\mathbb{E}\left[{\chi_{n}(t)}\right]$
$\displaystyle=p_{n}(t,v).$ (45)

Similarly, the average of $\eta_{nm}(t)$ is the total number of transitions
from state $n$ to state $m$:

$\displaystyle\mathbb{E}\left[{\eta_{nm}(t)}\right]$
$\displaystyle=p_{m}(t,v)R_{nm}(\lambda_{t}).$ (46)

As mentioned in the main text, we consider a small perturbation of the speed
of the system,

$\displaystyle\tilde{p}_{n}(t,v)$
$\displaystyle=p_{n}(t^{\prime},v^{\prime}),$ (47)
$\displaystyle\tilde{\lambda}_{t}=\lambda(t^{\prime}v^{\prime})$
$\displaystyle=\lambda(tv)=\lambda_{t},$ (48)

where $t^{\prime}\equiv(1+\theta)t$ and $v^{\prime}\equiv v/(1+\theta)$ with
perturbation control parameter $\theta$. The auxiliary process follows a
master equation,

$\displaystyle\dot{\tilde{p}}_{n}(t,v)=\sum_{m}\tilde{j}_{nm}(t,v),$ (49)

with the auxiliary probability current
$\tilde{j}_{nm}(t,v)=\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})-\tilde{p}_{n}(t,v)\tilde{R}_{mn}(\lambda_{t})$.
The auxiliary probability current is assumed to satisfy

$\displaystyle\tilde{j}_{nm}(t,v)$
$\displaystyle=(1+\theta)j_{nm}(t^{\prime},v^{\prime}).$ (50)

The first derivative with respect to $\theta$ of the right-hand side of Eq.
(50) is given by

$\displaystyle\partial_{\theta}\tilde{j}_{nm}(t,v)=$
$\displaystyle\left[{\tilde{R}_{nm}(\lambda_{t})\partial_{\theta}\tilde{p}_{m}(t,v)-\tilde{R}_{mn}(\lambda_{t})\partial_{\theta}\tilde{p}_{n}(t,v)}\right]$
$\displaystyle+\left({\tilde{p}_{m}(t,v)\partial_{\theta}\tilde{R}_{nm}(\lambda_{t})-\tilde{p}_{n}(t,v)\partial_{\theta}\tilde{R}_{mn}(\lambda_{t})}\right).$
(51)

Using Eq. (47), the first derivative with respect to $\theta$ of the left-hand
side of Eq. (50) can be rewritten as

$\displaystyle\partial_{\theta}\left[{(1+\theta)j_{nm}(t^{\prime},v^{\prime})}\right]$
$\displaystyle=(1+\partial_{\theta})\left[{p_{m}(t^{\prime},v^{\prime})R_{nm}(\lambda_{t})-p_{n}(t^{\prime},v^{\prime})R_{mn}(\lambda_{t})}\right]$
$\displaystyle=(1+\partial_{\theta})\left[{\tilde{p}_{m}(t,v)R_{nm}(\lambda_{t})-\tilde{p}_{n}(t,v)R_{mn}(\lambda_{t})}\right].$
(52)

Combining Eqs. (50), (51), and (52), we obtain a requirement for the auxiliary
transition rates at $\theta=0$:

$\displaystyle\left.\left({\tilde{p}_{m}(t,v)\partial_{\theta}\tilde{R}_{nm}(\lambda_{t})-\tilde{p}_{n}(t,v)\partial_{\theta}\tilde{R}_{mn}(\lambda_{t})}\right)\right|_{\theta=0}=p_{m}(t,v)R_{nm}(\lambda_{t})-p_{n}(t,v)R_{mn}(\lambda_{t}).$
(53)

Next, we calculate the Fisher information of the auxiliary trajectory
probability given by

$\displaystyle\tilde{\mathbb{P}}[\omega_{\tau}]\equiv\exp\left({\int_{0}^{\tau}dt\sum_{n}{\chi}_{n}(t)\tilde{R}_{nn}(\lambda_{t})+\sum_{n\neq
m}{\eta}_{nm}(t)\ln\tilde{R}_{nm}(\lambda_{t})}\right)p_{n_{0}}(0).$ (54)

Assuming that the auxiliary and original processes start with the same initial
probability distribution $p_{n_{0}}(0)$, which is independent of $\theta$,
Fisher information is given by

$\displaystyle\mathcal{I}(\theta)$
$\displaystyle=-\tilde{\mathbb{E}}\left[{\frac{\partial^{2}}{\partial\theta^{2}}\ln\tilde{\mathbb{P}}(\omega)}\right]$
(55)
$\displaystyle=-\tilde{\mathbb{E}}\left[{\int_{0}^{\tau}dt\frac{\partial^{2}}{\partial\theta^{2}}\left({\sum_{n}{\chi}_{n}(t)\tilde{R}_{nn}(\lambda_{t})+\sum_{n\neq
m}{\eta}_{nm}(t)\ln\tilde{R}_{nm}(\lambda_{t})}\right)}\right]$
$\displaystyle=-\int_{0}^{\tau}dt\left({\sum_{n}\tilde{p}_{n}(t,v)\frac{\partial^{2}}{\partial\theta^{2}}\tilde{R}_{nn}(\lambda_{t})+\sum_{n\neq
m}\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})\frac{\partial^{2}}{\partial\theta^{2}}\ln\tilde{R}_{nm}(\lambda_{t})}\right)$
$\displaystyle=\int_{0}^{\tau}dt\sum_{n\neq
m}\left({\tilde{p}_{m}(t,v)\frac{\partial^{2}}{\partial\theta^{2}}\tilde{R}_{nm}(\lambda_{t})-\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})\frac{\partial^{2}}{\partial\theta^{2}}\ln\tilde{R}_{nm}(\lambda_{t})}\right)$
$\displaystyle=\int_{0}^{\tau}dt\sum_{n\neq
m}\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})\left({\partial_{\theta}\ln\tilde{R}_{nm}(\lambda_{t})}\right)^{2}$

Here, we use Eqs. (45) and (46) in the third line and the normalization
condition $\sum_{m}\tilde{R}_{mn}(\lambda_{t})=0$ in the fourth line.
Therefore, the Fisher information can be written as

$\displaystyle\mathcal{I}(\theta)$
$\displaystyle=\int_{0}^{\tau}dt\sum_{n<m}\left[{\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})\left({\partial_{\theta}\ln\tilde{R}_{nm}(\lambda_{t})}\right)^{2}+\tilde{p}_{n}(t,v)\tilde{R}_{mn}(\lambda_{t})\left({\partial_{\theta}\ln\tilde{R}_{mn}(\lambda_{t})}\right)^{2}}\right].$
(56)

Using the inequality $\alpha x^{2}+\beta y^{2}\geq\frac{(\alpha x-\beta
y)^{2}}{\alpha+\beta}$, we obtain a lower bound on the Fisher information:

$\displaystyle\mathcal{I}(\theta)$
$\displaystyle\geq\int_{0}^{\tau}dt\sum_{n<m}\frac{\left({\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})\partial_{\theta}\ln\tilde{R}_{nm}(\lambda_{t})-\tilde{p}_{n}(t,v)\tilde{R}_{mn}(\lambda_{t})\partial_{\theta}\ln\tilde{R}_{mn}(\lambda_{t})}\right)^{2}}{\tilde{p}_{m}(t,v)\tilde{R}_{nm}(\lambda_{t})+\tilde{p}_{n}(t,v)\tilde{R}_{mn}(\lambda_{t})}.$
(57)

Using the requirement for the auxiliary transition rates in Eq. (53), the
lower bound is equal to half of the pseudo–entropy production at $\theta=0$:

$\displaystyle\mathcal{I}(0)$
$\displaystyle\geq\int_{0}^{\tau}dt\sum_{n<m}\frac{\left({p_{m}(t,v)R_{nm}(\lambda_{t})-p_{n}(t,v)R_{mn}(\lambda_{t})}\right)^{2}}{p_{m}(t,v)R_{nm}(\lambda_{t})+p_{n}(t,v)R_{mn}(\lambda_{t})}=\frac{1}{2}\Sigma_{\tau}^{\rm
ps}.$ (58)

This inequality is saturated when the auxiliary transition rate
$\tilde{R}_{nm}(\lambda_{t})$ $(m\neq n)$ is chosen as follows:

$\displaystyle\tilde{R}_{nm}(\lambda_{t})$
$\displaystyle=R_{nm}(\lambda_{t})\left(1+\theta\frac{p_{m}(t^{\prime},v^{\prime})R_{nm}(\lambda_{t})-p_{n}(t^{\prime},v^{\prime})R_{mn}(\lambda_{t})}{p_{m}(t^{\prime},v^{\prime})R_{nm}(\lambda_{t})+p_{n}(t^{\prime},v^{\prime})R_{mn}(\lambda_{t})}\right).$
(59)

Therefore, the pseudo–entropy production is twice the minimum Fisher
information for all possible auxiliary transition rates.

##  Appendix C Cramér–Rao inequality for a time-integrated current

The time-integrated current has the following form:

$\displaystyle\mathcal{J}(\omega_{\tau})=\int_{0}^{\tau}dt\sum_{n\neq
m}d_{nm}(\lambda_{t})\eta_{nm}(t),$ (60)

where the coefficient $d_{nm}(\lambda_{t})$ satisfies
$d_{nm}(\lambda_{t})=-d_{mn}(\lambda_{t})$. The average of the current is
given by

$\displaystyle\mathbb{E}\left[{\mathcal{J}(\omega_{\tau})}\right]=\int_{0}^{\tau}dt\sum_{n<m}d_{nm}(\lambda_{t})j_{nm}(t,v).$
(61)

Following the Cramér–Rao inequality, we have

$\displaystyle\mathcal{I}(\theta)\geq\frac{\left({\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{J}}\right]}\right)^{2}}{\tilde{\operatorname{Var}}\left[\mathcal{J}\right]}.$
(62)

When $\theta=0$, the partial derivative of the average current can be
calculated as

$\displaystyle\left.\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{J}}\right]\right|_{\theta=0}$
$\displaystyle=\tau\left.\partial_{\theta}\frac{1}{\tau}\int_{0}^{\tau}dt\sum_{n<m}d_{nm}(\lambda_{t})\tilde{j}(t,v)\right|_{\theta=0}$
(63)
$\displaystyle=\tau\left.\partial_{\theta}\frac{1}{\tau}\int_{0}^{\tau}dt\sum_{n<m}d_{nm}(\lambda({t^{\prime}v^{\prime}}))(1+\theta)j_{nm}(t^{\prime},v^{\prime})\right|_{\theta=0}$
$\displaystyle=\tau\left.\partial_{\theta}\frac{1}{\tau^{\prime}}\int_{0}^{\tau^{\prime}}dt^{\prime}\sum_{n<m}d_{nm}(\lambda({t^{\prime}v^{\prime}}))(1+\theta)j_{nm}(t^{\prime},v^{\prime})\right|_{\theta=0}$
$\displaystyle=\tau\left({1+\tau\partial_{\tau}-v\partial_{v}}\right)\left({\frac{1}{\tau}\mathbb{E}\left[{\mathcal{J}}\right]}\right)$
$\displaystyle=\nabla\mathbb{E}\left[{\mathcal{J}}\right],$

with $\tau^{\prime}=(1+\theta)\tau$ and the differential operator
$\nabla\equiv\tau\partial_{\tau}-v\partial_{v}$. Therefore, the Cramér–Rao
inequality at $\theta=0$ is as follows:

$\displaystyle\mathcal{I}(0)\geq\frac{\left({\nabla\mathbb{E}\left[{\mathcal{J}}\right]}\right)^{2}}{\operatorname{Var}\left[\mathcal{J}\right]}.$
(64)

It should be noted that Eq. (19) still holds for systems driven by multiple
protocols
$\bm{\lambda}_{t}\equiv\bm{\lambda}_{t}\left(\bm{v}\right)\equiv\left\\{\lambda_{1}\left(v_{1}t\right),\ldots,\lambda_{N_{\lambda}}\left(v_{N_{\lambda}}t\right)\right\\}$,
with $N_{\lambda}$ speed parameter. In this case, the differential operator is
given by
$\nabla\equiv\tau\partial_{\tau}-\sum_{i}\frac{v_{i}\partial}{\partial
v_{i}}$.

##  Appendix D Cramér–Rao inequality for a time-integrated state observable

We consider a time-integrated state observable which has the following form:

$\displaystyle\mathcal{K}(\omega)=\int_{0}^{\tau}dt\sum_{n}b_{n}(\lambda_{t})\chi_{n}(t),$
(65)

where $b_{n}$ denotes an arbitrary increment. Following the Cramér–Rao
inequality, we have

$\displaystyle\mathcal{I}(\theta)\geq\frac{\left({\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{K}}\right]}\right)^{2}}{\tilde{\operatorname{Var}}\left[\mathcal{K}\right]}.$
(66)

Using the identity
$\tilde{\mathbb{E}}\left[{\tilde{\chi}_{n}(t)}\right]=\tilde{p}_{n}(t,v)$, we
obtain

$\displaystyle\left.\partial_{\theta}\tilde{\mathbb{E}}\left[{\mathcal{K}}\right]\right|_{\theta=0}$
$\displaystyle=\tau\left.\partial_{\theta}\frac{1}{\tau}\int_{0}^{\tau}dt\sum_{n}b_{n}(\lambda_{t})\tilde{p}_{n}(t,v)\right|_{\theta=0}$
(67)
$\displaystyle=\tau\left.\partial_{\theta}\frac{1}{\tau^{\prime}}\int_{0}^{\tau^{\prime}}dt^{\prime}\sum_{n}b_{n}(\lambda({t^{\prime}v^{\prime}}))p_{n}(t^{\prime},v^{\prime})\right|_{\theta=0}$
$\displaystyle=\tau\left({\tau\partial_{\tau}-v\partial_{v}}\right)\left({\frac{1}{\tau}\mathbb{E}\left[{\mathcal{K}}\right]}\right)$
$\displaystyle=(\nabla-1)\mathbb{E}\left[{\mathcal{K}}\right].$

Thus, at $\theta=0$, the Cramér–Rao inequality becomes

$\displaystyle\mathcal{I}(0)\geq\frac{\left[{(\nabla-1)\mathbb{E}\left[{\mathcal{K}}\right]}\right]^{2}}{\operatorname{Var}\left[\mathcal{K}\right]}.$
(68)

Using Eq. (10), we obtain an uncertainty relation for the time-integrated
state observable:

$\displaystyle\frac{\Sigma_{\tau}^{2}}{4\mathcal{A}_{\tau}}f\left({\frac{\Sigma_{\tau}}{2\mathcal{A}_{\tau}}}\right)^{-2}\geq\frac{\left[{(\nabla-1)\mathbb{E}\left[{\mathcal{K}}\right]}\right]^{2}}{\operatorname{Var}\left[\mathcal{K}\right]}.$
(69)

##  Appendix E Biased random walk

We illustrate the unified TKUR with a simple model: a one-dimensional biased
random walk on $\mathbb{Z}$. We assume that the walker is in position zero at
$t=0$. From the current position $x$, the walker jumps to position $x\pm 1$ at
a rate $k^{\pm}$. The system evolves according to the master equation:

$\displaystyle\dot{p}_{x}(t)=k^{-}p_{x-1}(t)+k^{+}p_{x+1}(t)-(k^{-}+k^{+})p_{x}(t),$
(70)

where $p_{x}(t)$ is the probability that the system is in position $x$ at time
$t$. We consider the empirical integrated current

$\displaystyle J(t)=n^{+}(t)-n^{-}(t),$ (71)

where $n^{+}(t)$ and $n^{-}(t)$ denote the total number of transitions that
$x$ has increased and decreased, respectively, by time $t$. After time $\tau$,
the moments of $J(\tau)$ are given by

$\displaystyle\mathbb{E}\left[{J(\tau)}\right]$
$\displaystyle=\tau(k^{+}-k^{-}),$ (72)
$\displaystyle\operatorname{Var}\left[J(\tau)\right]$
$\displaystyle=\tau(k^{+}+k^{-})$ (73)

and the dynamical activity is given by

$\displaystyle\mathcal{A}=\tau\left({k^{+}+k^{-}}\right).$ (74)

We assume that the transition rates satisfy the local detailed balance
relation. Then, the total entropy production is as follows:

$\displaystyle\sigma=\tau(k^{+}-k^{-})\ln\frac{k^{+}}{k^{-}}.$ (75)

Using Eq. (42), it is clear that the total entropy production, dynamical
activity, and precision obey the following relation:

$\displaystyle\frac{\sigma^{2}}{4\mathcal{A}}f\left({\frac{\sigma}{2\mathcal{A}}}\right)^{-2}=\frac{\mathbb{E}\left[{J(\tau)}\right]^{2}}{\operatorname{Var}\left[J(\tau)\right]}.$
(76)

## References

## References

  * [1] Barato A C and Seifert U 2015 Phys. Rev. Lett. 114(15) 158101 URL https://link.aps.org/doi/10.1103/PhysRevLett.114.158101
  * [2] Gingrich T R, Horowitz J M, Perunov N and England J L 2016 Phys. Rev. Lett. 116(12) 120601 URL https://link.aps.org/doi/10.1103/PhysRevLett.116.120601
  * [3] Pietzonka P, Barato A C and Seifert U 2016 Phys. Rev. E 93(5) 052145 URL https://link.aps.org/doi/10.1103/PhysRevE.93.052145
  * [4] Horowitz J M and Gingrich T R 2017 Phys. Rev. E 96(2) 020103(R) URL https://link.aps.org/doi/10.1103/PhysRevE.96.020103
  * [5] Dechant A and ichi Sasa S 2020 Proc. Natl. Acad. Sci. U.S.A. 117 6430–6436 URL https://www.pnas.org/doi/abs/10.1073/pnas.1918386117
  * [6] Hasegawa Y and Van Vu T 2019 Phys. Rev. E 99(6) 062126 URL https://link.aps.org/doi/10.1103/PhysRevE.99.062126
  * [7] Hasegawa Y and Van Vu T 2019 Phys. Rev. Lett. 123(11) 110602 URL https://link.aps.org/doi/10.1103/PhysRevLett.123.110602
  * [8] Van Vu T and Hasegawa Y 2019 Phys. Rev. E 100(1) 012134 URL https://link.aps.org/doi/10.1103/PhysRevE.100.012134
  * [9] Falasco G and Esposito M 2020 Phys. Rev. Lett. 125(12) 120604 URL https://link.aps.org/doi/10.1103/PhysRevLett.125.120604
  * [10] Van Vu T and Hasegawa Y 2020 Phys. Rev. Research 2(1) 013060 URL https://link.aps.org/doi/10.1103/PhysRevResearch.2.013060
  * [11] Wolpert D H 2020 Phys. Rev. Lett. 125(20) 200602 URL https://link.aps.org/doi/10.1103/PhysRevLett.125.200602
  * [12] Yoshimura K and Ito S 2021 Phys. Rev. Lett. 127(16) 160601 URL https://link.aps.org/doi/10.1103/PhysRevLett.127.160601
  * [13] Dechant A and Sasa S i 2021 Phys. Rev. Research 3(4) L042012 URL https://link.aps.org/doi/10.1103/PhysRevResearch.3.L042012
  * [14] Dechant A and Sasa S i 2021 Phys. Rev. X 11(4) 041061 URL https://link.aps.org/doi/10.1103/PhysRevX.11.041061
  * [15] Hartich D and Godec A c v 2021 Phys. Rev. Lett. 127(8) 080601 URL https://link.aps.org/doi/10.1103/PhysRevLett.127.080601
  * [16] Lee J S, Park J M and Park H 2021 Phys. Rev. E 104(5) L052102 URL https://link.aps.org/doi/10.1103/PhysRevE.104.L052102
  * [17] Horowitz J M and Gingrich T R 2020 Nat. Phys. 16 15–20 ISSN 1745-2481 URL https://doi.org/10.1038/s41567-019-0702-6
  * [18] Hasegawa Y 2020 Phys. Rev. Lett. 125(5) 050601 URL https://link.aps.org/doi/10.1103/PhysRevLett.125.050601
  * [19] Hasegawa Y 2021 Phys. Rev. Lett. 126(1) 010602 URL https://link.aps.org/doi/10.1103/PhysRevLett.126.010602
  * [20] Miller H J D, Mohammady M H, Perarnau-Llobet M and Guarnieri G 2021 Phys. Rev. Lett. 126(21) 210603 URL https://link.aps.org/doi/10.1103/PhysRevLett.126.210603
  * [21] Hasegawa Y 2021 Phys. Rev. Lett. 127(24) 240602 URL https://link.aps.org/doi/10.1103/PhysRevLett.127.240602
  * [22] Van Vu T and Saito K 2022 Phys. Rev. Lett. 128(14) 140602 URL https://link.aps.org/doi/10.1103/PhysRevLett.128.140602
  * [23] Garrahan J P 2017 Phys. Rev. E 95(3) 032134 URL https://link.aps.org/doi/10.1103/PhysRevE.95.032134
  * [24] Di Terlizzi I and Baiesi M 2018 J. Phys. A: Math. Theor. 52 02LT03 URL https://doi.org/10.1088/1751-8121/aaee34
  * [25] Hiura K and Sasa S i 2021 Phys. Rev. E 103(5) L050103 URL https://link.aps.org/doi/10.1103/PhysRevE.103.L050103
  * [26] Li J, Horowitz J M, Gingrich T R and Fakhri N 2019 Nat. Commun. 10 1666 ISSN 2041-1723 URL https://doi.org/10.1038/s41467-019-09631-x
  * [27] Manikandan S K, Gupta D and Krishnamurthy S 2020 Phys. Rev. Lett. 124(12) 120603 URL https://link.aps.org/doi/10.1103/PhysRevLett.124.120603
  * [28] Van Vu T, Vo V T and Hasegawa Y 2020 Phys. Rev. E 101(4) 042138 URL https://link.aps.org/doi/10.1103/PhysRevE.101.042138
  * [29] Otsubo S, Ito S, Dechant A and Sagawa T 2020 Phys. Rev. E 101(6) 062106 URL https://link.aps.org/doi/10.1103/PhysRevE.101.062106
  * [30] Pal A, Reuveni S and Rahav S 2021 Phys. Rev. Research 3(1) 013273 URL https://link.aps.org/doi/10.1103/PhysRevResearch.3.013273
  * [31] Pal A, Reuveni S and Rahav S 2021 Phys. Rev. Research 3(3) L032034 URL https://link.aps.org/doi/10.1103/PhysRevResearch.3.L032034
  * [32] Maes C 2020 Phys. Rep. 850 1–33 ISSN 0370-1573 URL https://www.sciencedirect.com/science/article/pii/S0370157320300120
  * [33] Seifert U 2012 Rep. Prog. Phys. 75 126001 URL https://doi.org/10.1088/0034-4885/75/12/126001
  * [34] Garrahan J P, Jack R L, Lecomte V, Pitard E, van Duijvendijk K and van Wijland F 2007 Phys. Rev. Lett. 98(19) 195702 URL https://link.aps.org/doi/10.1103/PhysRevLett.98.195702
  * [35] Maes C and Netočný K 2008 Europhys Lett. 82 30003 URL https://doi.org/10.1209/0295-5075/82/30003
  * [36] Lecomte V, Appert-Rolland C and van Wijland F 2005 Phys. Rev. Lett. 95(1) 010601 URL https://link.aps.org/doi/10.1103/PhysRevLett.95.010601
  * [37] Shiraishi N, Funo K and Saito K 2018 Phys. Rev. Lett. 121(7) 070601 URL https://link.aps.org/doi/10.1103/PhysRevLett.121.070601
  * [38] Gupta D and Busiello D M 2020 Phys. Rev. E 102(6) 062121 URL https://link.aps.org/doi/10.1103/PhysRevE.102.062121
  * [39] Funo K, Shiraishi N and Saito K 2019 New J. Phys. 21 013006 URL https://doi.org/10.1088/1367-2630/aaf9f5
  * [40] Van Vu T and Hasegawa Y 2021 Phys. Rev. Lett. 126(1) 010601 URL https://link.aps.org/doi/10.1103/PhysRevLett.126.010601
  * [41] Van Vu T and Hasegawa Y 2021 Phys. Rev. Lett. 127(19) 190601 URL https://link.aps.org/doi/10.1103/PhysRevLett.127.190601
  * [42] Van Vu T and Saito K 2022 Phys. Rev. Lett. 128(1) 010602 URL https://link.aps.org/doi/10.1103/PhysRevLett.128.010602
  * [43] Dechant A 2022 Journal of Physics A: Mathematical and Theoretical 55 094001 URL https://doi.org/10.1088/1751-8121/ac4ac0
  * [44] Salazar D S P 2022 Lower bound for entropy production rate in stochastic systems far from equilibrium URL https://arxiv.org/abs/2204.00875
  * [45] Vo V T, Van Vu T and Hasegawa Y 2020 Phys. Rev. E 102(6) 062132 URL https://link.aps.org/doi/10.1103/PhysRevE.102.062132
  * [46] Koyuk T and Seifert U 2020 Phys. Rev. Lett. 125(26) 260604 URL https://link.aps.org/doi/10.1103/PhysRevLett.125.260604
  * [47] Baiesi M, Maes C and Wynants B 2009 Phys. Rev. Lett. 103(1) 010602 URL https://link.aps.org/doi/10.1103/PhysRevLett.103.010602
  * [48] Shiraishi N 2021 J. Stat. Phys. 185 19 ISSN 1572-9613 URL https://doi.org/10.1007/s10955-021-02829-8
  * [49] Barato A C, Chetrite R, Faggionato A and Gabrielli D 2018 New J. Phys. 20 103023 URL https://doi.org/10.1088/1367-2630/aae512
  * [50] Dechant A 2018 J. Phys. A 52 035001 URL https://doi.org/10.1088/1751-8121/aaf3ff
  * [51] Gillespie D T 1991 Markov processes: an introduction for physical scientists (San Diego: Elsevier) ISBN 978-0-12-283955-9
  * [52] Mandelstam L and Tamm I 1945 J. Phys. 9 249
  * [53] Okuyama M and Ohzeki M 2018 Phys. Rev. Lett. 120(7) 070402 URL https://link.aps.org/doi/10.1103/PhysRevLett.120.070402