# Improving Data Quality with Training Dynamics of Gradient Boosting Decision
Trees

Moacir A. Ponti, Lucas de Angelis Oliveira, Juan Martín Román, Luis Argerich
Mercado Libre
<EMAIL_ADDRESS>
###### Abstract

Real world datasets contain incorrectly labeled instances that hamper the
performance of the model and, in particular, the ability to generalize out of
distribution. Also, each example might have different contribution towards
learning. This motivates studies to better understanding of the role of data
instances with respect to their contribution in good metrics in models. In
this paper we propose a method based on metrics computed from training
dynamics of Gradient Boosting Decision Trees (GBDTs) to assess the behavior of
each training example. We focus on datasets containing mostly tabular or
structured data, for which the use of Decision Trees ensembles are still the
state-of-the-art in terms of performance. We show results on detecting noisy
labels in order to either remove them, improving models’ metrics in synthetic
and real datasets, as well as a productive dataset. Our methods achieved the
best results overall when compared with confident learning and heuristics.

###### Index Terms:

data quality, noisy labels, decision trees

##  I Introduction

Investigating data quality is paramount to allow business analytics and data
science teams to extract useful knowledge from databases. A business rule may
be incorrectly defined, or unrealistic conclusions may be drawn from bad data.
Machine Learning models may output useless scores, and Data Science techniques
may provide wrong information for decision support in this context. Therefore,
it is important to be able to assess the quality of training data [1, 2].

Large datasets are currently commonplace due to the possibility of leveraging
data from the Internet, crowdsourcing of data in the case of academia, or
storing transactions and information of business into data lakes in the case
of industry. However, such sources are prone to noise, in particular when it
comes to annotations. Even benchmark datasets contain incorrectly labeled
instances that affect the performance of the model and, in particular, the
ability to generalize out of distribution [3, 4]. In this context, while
Machine Learning theory often shows benefits of having large quantities of
data in order to improve generalization of supervised models, usually via the
Law of Large Numbers [5], it does not address the case of data with high noise
ratio.

In fact, different examples might not contribute equally towards learning [6,
7]. This motivates studies to better understanding of the role of data
instances with respect to their contribution in good metrics in models.
Instance hardness may be a way towards this idea [8]. However, more than
identifying how hard a given example is for the task at hand, we believe there
is significant benefit in segmenting the dataset into examples that are useful
to discover patterns, from those useless for knowledge discovery [9, 10].
Trustworthy data are those with correct labels, ranging from typical examples
that are easy to learn, ambiguous or borderline instances which may require a
more complex model to allow learning, and atypical (or rare) that are hard-to-
learn.

Therefore, in this paper we propose a method based on metrics computed from
training dynamics of Gradient Boosting Decision Trees (GBDTs) to assess the
behavior of each training example. In particular, it uses either XGBoost [11]
or LightGBM [12] as base models. Our algorithm is based on the Dataset
Cartography idea as proposed by for Neural Networks in the context of natural
language processing datasets [13]. In contrast, we focus on datasets
containing mostly tabular or structured data, for which the use of Decision
Trees ensembles are still the state-of-the-art in terms of performance,
classification metrics, as well as interpretability [14]. Also [13] devote
their main efforts to investigate the use of ambiguous examples to improve
generalization and only briefly to mislabeled examples. In contrast, in this
study we focus on detecting noisy labels in order to either remove it or
relabel it to improve models’ metrics.

Our contributions are as follows:

  1. 1.

We are the first to introduce training dynamics metrics for dataset instances,
a.k.a. Dataset Cartography, using ensembles of decision trees;

  2. 2.

Propose a novel algorithm that uses the computed training dynamics metrics in
conjunction with LigthGBM/XGBoost iterative instance weights to improve noisy
label detection;

  3. 3.

We show that removing mislabeled instances improves performance of models,
outperforming previous work in many scenarios, including simulations and a
produtive dataset.

##  II Related Work

Previous work includes approaches to score dataset instances using confidence
[15] and metrics of hardness [16]. Beyond measuring confidence or hardness,
the field known as “confident learning” [17] intents to address the issue of
uncertainty in data labels during neural network training. Some important
conclusions were drawn in this scenario for multiclass problems, in
particular: (i) that label noise is class-conditional [18], e.g. in an natural
image scenario a dog is more likely to be misclassified as wolf than as
airplane; (ii) that joint distribution between given (noisy) labels and
unknown (true) labels can be achieved via a series of approaches: pruning,
counting and ranking. According to [17], prune is to search for label errors,
for example via loss-reweighing to avoid iterative re-labeling [19, 20], or
using unlabeled data to prune labeled datasets [7]. Count is to train on clean
data in order to avoid propagating error in learned models [21]. Then, to rank
examples to use during training as in curriculum learning [8].

Using learning or training dynamics for neural networks models was shown to be
useful to identify quality of instances. For example, comparing score values
with its highest non-assigned class [22] or instances with low loss values
[23]. Understand which instances represent simpler patterns and are easy-to-
learn [24], as well as those that are easily forgotten [25] (misclassified) in
a later epoch. Such studies show that deep networks are biased towards
learning easier examples faster during training. In this context, making sure
the deep network memorizes rare and ambiguous instances, while avoiding
memorization of easy ones, lead to better generalization [26, 13, 27]. Noise
in both training and testing data led to practical limits in performance
metrics requiring use of novel training approaches [28]. This is important in
the context of neural networks since usually such models require an order of
magnitude more data in order to improve metrics in $3-2\%$ [7].

While previous work addresses issues closely related to deep neural networks
and large scale image and text datasets, studies on datasets containing
tabular or structured data are still to be conducted. Decision trees are shown
to be robust to low label noise [29], making it a feasible model to
investigate under significant noise regimes. Also, the use of decision tree-
based models is relevant since such approach still represent the state-of-the-
art in many real world problems [14].

##  III Dataset Cartography using Training Dynamics of Decision Trees

In the context of Boosting-based Decision Trees ensembles, the training
dynamics are given by a sequence of trees, each learned by using as input
weights for the misclassified instances in the previous iteration. For each
iteration $i$ of a GBDT model $i$ trees (estimators) are used to compute the
probabilities/scores for each class and all instances of the dataset. An
advantage of using such ensembles, such as LightGBM and XGBoost, is that we
are able to compute scores at any iteration using an already trained model,
without the need to retrain it from scratch, as in neural networks.

We define as $p^{*}_{(i)}(y^{*}_{j}|x_{j})$ the score the model predicted for
the classes of each instance $j$, where the input is $x_{j}$ and its training
label $y^{*}_{j}$. The predicted label is $\hat{y}_{j}$. Note that
$\hat{y}_{j}$ (predicted by the model) may be equal or different than
$y^{*}_{j}$ (training label). This method is supervised, requiring
$y^{*}_{j}$, and therefore allows to assess only training instances.

The following training dynamics statistics are computed for each instance:

  * •

Confidence: the average score for the true label $y^{*}_{j}$ across all
iterations:

$\mu_{j}=\frac{1}{T}\sum_{i=1}^{T}p^{*}_{(i)}(y^{*}_{j}|x_{j}),$

where $p^{*}_{(i)}$ is the model’s score at iteration $i$ relative to the true
label (not the highest score estimated by the model);

  * •

Correctness: the percentage of iterations for which the model correctly labels
$x_{j}$:

$c_{j}=\frac{1}{T}\sum_{i=1}^{T}(\hat{y}_{j}=y^{*}_{j}),$

  * •

Variability: the standard deviation of $p^{*}_{(i)}$ across iterations:

$\sigma_{j}=\sqrt{\frac{\sum_{i=1}^{T}(p^{*}_{(i)}(y^{*}_{j}|x_{j})-\mu_{j})^{2}}{T}}.$

Figure 1: Dataset cartography based on training dynamics: average confidence,
variability and correctness, allowing to map the instances to how the model
evolved to estimate the outputs along instances.

The metrics are in the range $[0,1]$. The name “dataset cartography” comes
from a visualization of such metrics as proposed by [13], and illustrated in
Figure 1. Algorithm 1 details how to compute such metrics using GBDTs, given a
trained model $h(.,.)$ for which it is possible to get the output for an
iteration $i$, and the dataset used to train this model $X,Y$.

Algorithm 1 Dataset Cartography: Training Dynamic Metrics for GBDTs

0: Training set: $X,Y$

0: Trained model: $h(.,.)$

0: Number of estimators/iterations: $T$

$\hat{S}\leftarrow\emptyset$ {initialize set of scores}

$\hat{Y}\leftarrow\emptyset$ {initialize set of labels}

{for each iteration}

for $i=0$ to $T-1$ do

$\hat{s}_{i}\leftarrow h(X,i)$ {predictions for all classes}

$\hat{y}_{i}\leftarrow\arg\max(\hat{s}_{i})$ {predicted labels of all items}

$\hat{S}\leftarrow\hat{S}\cup p^{*}_{(i)}(y^{*}|x)$ {scores for training
labels at $i$}

$\hat{Y}\leftarrow\hat{Y}\cup\hat{y}_{i}$ {store predicted labels at $i$}

end for

$\mu\leftarrow\operatorname{mean}(\hat{S})$ {average of scores for training
labels}

$\sigma\leftarrow\operatorname{std}(\hat{S})$ {spread of scores}

$c\leftarrow\operatorname{sum}(\hat{Y}==Y)/T$ {percentage of correct
predictions}

return $\mu,\sigma,c$

Possible interpretations are as follows. A high confidence example can be
considered easy for the model to learn. An example for which the model assigns
the same label has low variability, which associated with high confidence
makes the example even easier. In contrast, high variability means different
subset of trees provide different scores for an instance, indicating harder
instances, that are usually associated to complex patterns, rare or atypical
ones. High correctness are associated to easy instances, but such instances
may have confidence ranging from 1.0 to 0.5), while near zero correctness
indicates an instance that the model cannot learn.

##  IV Improving Dataset Quality

Each metric (confidence, variability, correctness) may be applied in different
ways to assess the dataset. In this paper, we propose a series of approaches
to use training dynamics statistics in order to improve quality of datasets.
In particular we address the problem of detecting pathological examples, those
that potentially harm the model’s performance. The proposed methods, from the
simpler to the most complex, are as follows: (i) using a combination of
confidence and correctness to remove useless instances by threshold, (ii)
iteratively learn pathological examples in order to separate them from the
good ones by combining the gradient boosting instance weights and the training
statistics.

###  IV-A Threshold based on product between confidence and correctness

In a first approach, we multiply the values of confidence and correctness,
i.e. $m_{j}=c_{j}\cdot\mu_{j}$ for each instance $j$ and decide whether to
keep or remove a given instance from the training set. In Figure 2 we show an
example of toy dataset and the relationship between confidence, correctness,
as well as its multiplication. We can see that those metrics are quite
correlated. Note, however, points may have confidence near 0.5 but correctness
0.0, that is, the model produce fairly high confidence for the correct class,
but may be still insufficient to classify it correctly. On the other hand, the
model may have also confidence near 0.5 and be able to correctly classify the
example. This motivated us to use the product instead of each metric
independently.

Therefore, the product between confidence and correctness may be an
interesting option to assess the difficulty of an example to be learned, as
well as indicating a possible pathological example. In this – simple yet
effective – approach we use either a visual inspection on the distribution of
$m_{j}$ across all values of the training set as illustrated in Figure 3-(a),
or use a validation set in order to find a threshold, in order to remove
examples from the training set and retrain the model.

Figure 2: Correctness versus Confidence for each instance, as well as their multiplication (coded in different colors). |
---|---
(a) $m_{j}$ distribution | (b) $w_{j}$ distribution
Figure 3: Violin plot with the distributions of (a) $m_{j}$ correctness and
confidence product, and (b) $w_{j}$ learned weights across the ”binary
synthetic” dataset instances

###  IV-B Learning weights for iterative noise detection

Although a simple threshold may improve the results of a model by removing
pathological instances, it may be difficult to find an optimal cutoff value.
Therefore, our second approach learns the weights of each instance, reducing
the weights of pathological ones iteratively during $E$ iterations. As
detailed in Algorithm 2, it starts by initializing all instances with equal
weights, and for each iteration $l$ uses the correctness and confidence
product to adjust such weights, using it in the training process of the GBDT
algorithm. The hypothesis is that noisy values will have progressively lower
weights when compared with clean instances.

Algorithm 2 Iterative weight learning for noise detection

0: Training set: $X,Y$ with instances $j=1\ldots n$

$w_{j}\leftarrow 1/n\text{, }j=1\ldots n$ {initialize instances weights}

for $l=0$ to $E$ do

train GBDT $h(.)$ with $(X,Y)$ and weights $w_{j}$

$\mu_{j},\sigma_{j},c_{j}\leftarrow$ DatasetCartography($X,Y,h$)

$w_{j}\leftarrow w_{j}-(1-c_{j}\cdot\mu_{j})$ {weights adjustment}

$w_{j}\leftarrow\operatorname{clip}(w_{j},0,1)$ {clip weights to range [0,1]}

end for

After learning the weights, it is possible to visually inspect the
distribution, as shown in Figure 3\- (b), or use other strategy to find the
cutoff point for noise detection. Note that this approach creates a more well
separated distribution of weights $w_{j}$ when compared with the direct use of
$m_{j}$ product of correctness and confidence values.

##  V Experiments

###  V-A Datasets

In this paper we investigate 5 datasets, 3 public and 2 synthetic as
summarized in Table I.

TABLE I: Datasets characteristics Dataset | #Instanc. | #Feat. | #Class. | Types | Real/Synt
---|---|---|---|---|---
Adult | 32561 | 14 | 2 | Cat/Num | Real
Covertype | 581012 | 54 | 7 | Num | Real
Breast Cancer | 569 | 30 | 2 | Num | Real
Binary | 15100 | 2 | 2 | Num | Synt
Multiclass | 16500 | 2 | 4 | Num | Synt

Both synthetic datasets were build using the data generator toolkit from the
Python library Scikit-Learn (version 1.1.2). The main goal was to create a
2-dimensional set of instances by composing clusters and complex shapes, like
moons and circles, in an unbalanced proportion of labels.

The public datasets were chosen to simulate some real world scenarios like few
data (Breast Cancer Wisconsin Diagnosis), unbalanced multi class (Covertype)
and mix of numerical and categorical features (Adult).

Each set was split in train, validation and test subsets using a 80-10-10
proportion (except for the Breast Cancer dataset in which was used a
proportion of 67-16.5-16.5 given it’s reduced size) in a stratified fashion to
keep the label distribution over the sets.

Figure 4: Synthetic datasets with 10% noise, binary version (top) and
multiclass version (bottom)

All raw datasets are assumed to be clean and the label noise was introduced
artificially only to train and validation sets. We investigated three noise
level proportions: 10%, 20% and 30%. In Figure 4 we display the 10% noisy
version of the binary synthetic dataset.

For binary classification problems the noise was simulated by flipping the
labels randomly following the specified proportion. In the multi class ones,
since those are unbalanced, we selected an strategy that allows us to keep the
label counting order of as in the original dataset. For this purpose two
strategies were employed:

  * •

Strategy 1: Pick instances from the dataset at random and sum 1 to the label
value. If the label value is the highest, replace it with the lowest. Example:
given the set of labels [0, 1, 2, 3, 4], if the select instance to be
transformed in noise has label 1, we add 1 to it and the new label is 2. If
the label was 4, the new label would be 0 in this case.

  * •

Strategy 2: Select a stratified sample from the dataset (according to the
label distribution) to be transformed in noise and change the label using the
label frequency rank, which means that the label with rank $i$ will be moved
to the label with frequency rank $(i-1)$. If we reach the end of the rank, the
changed label will be the first one in the rank. Example: given the set of
labels [0, 1, 2] with distribution 30-60-10, the label frequency rank is [1,
0, 2]. If the selected instance from the stratified sample has label 1 it will
be changed to 0. In the case of having label 2, it will be changed to 1.

To compare the strategies and select the one that causes less distortion in
the label distribution, we measured the sum of the absolute difference between
the distributions after adding the noise and the original one for each noise
level as shown in the Table II. Therefore, for noise level 10% and 20% we used
strategy 1 and for 30% is the strategy 2.

TABLE II: Multi Class Noise Addition Strategies Comparison | Noise Level
---|---
| 10% | 20% | 30%
Sum Abs Diff - Strategy 1 | 55978 | 111948 | 168566
Sum Abs Diff - Strategy 2 | 56112 | 112224 | 168334

###  V-B Baselines and evaluation

Our baselines are methods implemented in the libraries
cleanlab111https://github.com/cleanlab/cleanlab and
doubtlab222https://github.com/koaning/doubtlab. Both are used in practical
projects and in the industry for real world data. In cleanlab we have the
Confident Learning approach [17], while doubtlab uses an ensemble of methods
and heuristics. In particular we used an ensemble of the following reasons to
“doubt” the quality of the label of a given instance:

  * •

Confident Learning;

  * •

Low Probability: assign doubt when a models’ confidence values are below a
threshold of 0.55;

  * •

Short Confidence, assign doubt when the correct label gains too little
confidence, with threshold 0.05;

  * •

Long Confidence, assign doubt when any wrong label gains too much confidence,
with threshold 0.95;

  * •

Disagreement, assign doubt when two models disagree on a prediction. In our
case we used SVM and LightGBM.

Our methods are based on training dynamics metrics, in particular:

  * •

threshold on $m_{j}$: is carried out by computing $m_{j}=c_{j}\cdot\mu_{j}$,
i.e. correctness times confidence, and plot its distribution (as illustrated
in Figure 3), visually finding a threshold for each dataset;

  * •

threshold on $w_{j}$: similar to the previous one, but the distribution is
with respect to the learned weights $w_{j}$ after $E=10$ iterations.

Evaluation considers (i) compare the different methods and their ability to
detect instances with incorrect/noisy label, and (ii) compare classification
results of training with the noisy training set and training after removing
the detected noisy labels.

Let a positive instance be one with label noise. The following are used to
evaluate the noise detection methods:

  * •

Accuracy: ACC = FP / (TN+FP+TP+FN);

  * •

False Positive Rate: FPR = FP / (TN+FP);

  * •

False Negative Rate: FNR = FN / (TP+FN).

We used the precision, recall and f1-score to evaluate binary classification,
while the macro average is considered for the multiclass scenario.

The scripts for computing the training dynamics metrics with GBTD, as well as
the datasets used in our experiments are available at
https://github.com/mapontimeli/cartography_gbdt.

##  VI Results and discussion

###  VI-A Synthetic Datasets

We first show the results of incorrect label (or noisy label) detection,
detailed in Table III for Binary dataset, and Table IV for the Multiclass
dataset.

It is possible to note the method based on a threshold on the learned weights
$w_{j}$ present superior results on all synthetic results, but the multiclass
with 10% noise level for which the threshold on $m_{j}$ is better. In this
case, doubtlab heuristics performed worse, while cleanlab was competitive with
smaller noise levels.

TABLE III: Noise Detection Results for Binary Synthetic Dataset noise level | method | ACC | FPR | FNR
---|---|---|---|---
10% | thresh $m_{j}$ | 96.01 | 03.75 | 06.10
| thresh $w_{j}$ | 96.05 | 03.75 | 05.73
| cleanlab | 95.67 | 03.41 | 12.58
| doubtlab | 88.37 | 09.74 | 28.55
20% | thresh $m_{j}$ | 86.02 | 12.44 | 20.12
| thresh $w_{j}$ | 86.39 | 12.37 | 18.57
| cleanlab | 83.90 | 14.87 | 20.97
| doubtlab | 78.18 | 24.07 | 12.80
30% | thresh $m_{j}$ | 69.75 | 23.96 | 44.91
| thresh $w_{j}$ | 70.10 | 25.91 | 39.52
| cleanlab | 63.82 | 35.40 | 37.96
| doubtlab | 54.14 | 35.81 | 17.32
TABLE IV: Noise Detection Results for Multiclass Synthetic Dataset noise level | method | ACC | FPR | FNR
---|---|---|---|---
10% | thresh $m_{j}$ | 97.15 | 02.79 | 03.29
| thresh $w_{j}$ | 97.12 | 02.89 | 02.69
| cleanlab | 96.52 | 02.72 | 10.23
| doubtlab | 90.84 | 05.99 | 37.64
20% | thresh $m_{j}$ | 89.01 | 12.31 | 05.72
| thresh $w_{j}$ | 89.01 | 12.60 | 04.54
| cleanlab | 87.42 | 12.79 | 11.68
| doubtlab | 83.61 | 16.54 | 15.72
30% | thresh $m_{j}$ | 76.54 | 26.45 | 16.45
| thresh $w_{j}$ | 76.96 | 28.64 | 09.94
| cleanlab | 69.85 | 32.38 | 24.91
| doubtlab | 46.12 | 76.23 | 01.75

In terms of classification results for the synthetic datasets, we compared the
use of the noisy dataset with the cleaned dataset for training. In Table V the
weight learning method is used to clean the data since it achieved the best
results. A significant improvement is observed with the cleaned data in both
binary and multiclass scenarios.

TABLE V: Classification results of Synthetic datasets with the noisy data and after cleaning with the weight-based method Dataset |  | precision | recall | f1-score
---|---|---|---|---
Binary | noisy data | 0.56 | 0.85 | 0.68
Binary | cleaned $w_{j}$ | 0.68 | 0.89 | 0.77
Multiclass | noisy data | 0.79 | 0.84 | 0.80
Multiclass | cleaned $w_{j}$ | 0.88 | 0.89 | 0.88

###  VI-B Real Datasets

We first show the results of incorrect label (or noisy label) detection,
detailed in Table VI for Breast Cancer, in Table VII for the Adult, and
finally in Table VIII for Covertype datasets.

For the Breast cancer dataset all methods performed fairly well, the threshold
on $w_{j}$ was the most competitive, it was the best or second best method,
achieving good results across different noise levels.

Considering the Adult dataset, again our proposed methods performed well
across all noise levels, in particular using weights $w_{j}$ achieved the best
results with 20 and 30% noise, while Confident Learning (cleanlab) was the
best one with 10%.

Considering the Covertype dataset, which has multiple classes and has strong
imbalance, Confident learning achieved the best results. We believe this
dataset, after adding noise with our strategies, has introduced more class-
dependent noise so that Confident learning could better map such cases.

In general, our methods performed fairly well especially for scenarios high
noise (20-30%), while the ensemble of heuristics implemented by doubtlab could
not achieve good results overall. An exception is the Breast Cancer dataset,
the smallest one, for which the heuristics were competitive with respect to
the other methods.

TABLE VI: Noise Detection Results for Breast Cancer Dataset noise level | method | ACC | FPR | FNR
---|---|---|---|---
10% | thresh $m_{j}$ | 95.57 | 04.20 | 06.38
| thresh $w_{j}$ | 95.36 | 04.20 | 08.51
| cleanlab | 93.89 | 05.60 | 10.63
| doubtlab | 91.57 | 08.17 | 10.63
20% | thresh $m_{j}$ | 91.78 | 07.63 | 10.52
| thresh $w_{j}$ | 93.68 | 04.73 | 12.63
| cleanlab | 88.84 | 10.00 | 15.78
| doubtlab | 90.94 | 08.15 | 12.63
30% | thresh $m_{j}$ | 79.78 | 24.62 | 09.85
| thresh $w_{j}$ | 86.31 | 12.01 | 17.60
| cleanlab | 79.36 | 19.51 | 23.23
| doubtlab | 89.68 | 09.90 | 11.26
TABLE VII: Noise Detection Results for Adult Dataset noise level | method | ACC | FPR | FNR
---|---|---|---|---
10% | thresh $m_{j}$ | 84.32 | 15.01 | 21.59
| thresh $w_{j}$ | 84.52 | 14.82 | 21.25
| cleanlab | 86.93 | 11.86 | 23.88
| doubtlab | 66.86 | 36.17 | 05.76
20% | thresh $m_{j}$ | 83.53 | 14.83 | 22.99
| thresh $w_{j}$ | 83.97 | 14.58 | 21.78
| cleanlab | 83.00 | 15.68 | 22.24
| doubtlab | 67.88 | 39.44 | 02.81
30% | thresh $m_{j}$ | 81.80 | 14.71 | 26.32
| thresh $w_{j}$ | 82.58 | 14.42 | 24.41
| cleanlab | 79.29 | 19.75 | 22.92
| doubtlab | 67.48 | 45.36 | 02.54
TABLE VIII: Noise Detection Results for Covertype Dataset noise level | method | ACC | FPR | FNR
---|---|---|---|---
10% | thresh $m_{j}$ | 85.04 | 15.34 | 11.45
| thresh $w_{j}$ | 84.47 | 15.91 | 11.98
| cleanlab | 91.15 | 07.74 | 18.77
| doubtlab | 71.11 | 31.32 | 06.88
20% | thresh $m_{j}$ | 84.31 | 16.42 | 12.75
| thresh $w_{j}$ | 83.99 | 16.72 | 13.13
| cleanlab | 89.12 | 09.48 | 16.45
| doubtlab | 68.97 | 37.45 | 05.27
30% | thresh $m_{j}$ | 83.41 | 18.23 | 12.73
| thresh $w_{j}$ | 82.50 | 19.41 | 13.02
| cleanlab | 85.95 | 12.98 | 16.51
| doubtlab | 64.53 | 49.47 | 02.76

We also compare classification results for the real datasets. In Table IX the
weight learning method and confident learning (cleanlab) method are used to
clean the data since those achieved the best results. Significant improvement
is observed with the cleaned data, in particular for f1-score. An exception is
the Covertype dataset for which our method degraded the results. This is the
largest dataset in terms of instances and features. It also has strong
imbalance which may have made the problem more difficult.

TABLE IX: Classification results of Synthetic datasets with the noisy data and after cleaning with the weight-based method (threshold $w_{j}$ ) and confident learning method (cleanlab) Dataset |  | precision | recall | f1-score
---|---|---|---|---
Breast Cancer | noisy data | 0.81 | 0.74 | 0.78
Breast Cancer | cleaned $w_{j}$ | 1.00 | 0.68 | 0.81
Breast Cancer | cleanlab | 1.00 | 0.86 | 0.92
Adult | noisy data | 0.56 | 0.87 | 0.68
Adult | cleaned $w_{j}$ | 0.58 | 0.87 | 0.70
Adult | cleanlab | 0.56 | 0.89 | 0.69
Covertype | noisy data | 0.78 | 0.74 | 0.75
Covertype | cleaned $w_{j}$ | 0.72 | 0.73 | 0.71
Covertype | cleanlab | 0.78 | 0.74 | 0.75

###  VI-C Industry Case Sudy: forbidden items dataset

In Mercado Libre (Meli), one of the initiatives of the fraud prevention team
is to deploy models to detect forbidden items before such items are made
available in the marketplace. This protects users from unsafe or illegal
products. However, as in many real world scenarios, such labels come from
different sources such as denounces, manual revision, regular expression
detection and hard rules. When retrieved from a large time window from
hundreds of thousands items, such labels are usually noisy.

As shown in Figure 5, many instances of forbidden items have low correctness
and confidence. We used the proposed method to clean the training set in order
to avoid issues with conflicting labels. For example the item “In-Ear Hearing
Aid Power tone F-138” appeared in the dataset with both ”not forbidden” and
”forbidden” labels.

Figure 5: Cartography metrics for a forbidden item dataset with 4 classes. The
colorbar represents correctness in the range [0,1].

We used the proposed method, as well as the confident learning method, to
clean the training data removing the noisy examples. We also selected the
examples with weight zero (0.0) and submitted them for manual relabeling. The
results on a sample of productive data (200 items manually reviewed) are shown
in Table X. As confirmed by the simulated experiments, the method has strong
potential to be used to map candidates for noisy items, but also to select
instances for relabeling, significantly improving dataset quality.

TABLE X: Classification results of Forbidden Item Meli Dataset comparing before and after cleaning and testing in productive data | precision | recall | f1-score
---|---|---|---
noisy data | 0.76 | 0.91 | 0.79
cleaned $w_{j}$ | 0.82 | 0.88 | 0.84
cleaned cleanlab | 0.78 | 0.88 | 0.82
relabeled $w_{j}$ | 0.89 | 0.90 | 0.89
relabeled cleanlab | 0.86 | 0.88 | 0.86

##  VII Conclusion

Using training dynamics metrics is useful to detect pathological instances in
noisy datasets. Our experiments showed superior performance when using the
confidence and correctness metrics in order to iteratively separate such
instances from clean ones using weights. In particular for cases with a high
noise ratio, our experiments show significant improvement in f1-score when
removing such instances from the training set. Going beyond the simulations,
we also present a case study with a productive dataset, demonstrating the
practical applicability of the method.

Our main contribution is to present a methodology to work with ensembles of
boosted decision trees, which are highly relevant methods in the industry
since they allow to work with both categorical and numerical data. We believe
more advances towards understanding and learning with such data under noise
are still needed.

Future work may investigate strategies for automatically relabeling the noisy
candidate instances. Also, study other contexts of noisy labels such as class-
dependent mislabeling. Finally, applying such methods with other estimators,
such as XGBoost, as well as in other real world datasets.

## References

  * [1] A. Jain, H. Patel, L. Nagalapatti, N. Gupta, S. Mehta, S. Guttula, S. Mujumdar, S. Afzal, R. Sharma Mittal, and V. Munigala, “Overview and importance of data quality for machine learning tasks,” in _Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining_, 2020, pp. 3561–3562.
  * [2] D. Foroni, M. Lissandrini, and Y. Velegrakis, “Estimating the extent of the effects of data quality through observations,” in _2021 IEEE 37th International Conference on Data Engineering (ICDE)_. IEEE, 2021, pp. 1913–1918.
  * [3] R. Ekambaram, D. B. Goldgof, and L. O. Hall, “Finding label noise examples in large scale datasets,” in _2017 IEEE International Conference on Systems, Man, and Cybernetics (SMC)_. IEEE, 2017, pp. 2420–2424.
  * [4] V. Pulastya, G. Nuti, Y. K. Atri, and T. Chakraborty, “Assessing the quality of the datasets by identifying mislabeled samples,” in _Proceedings of the 2021 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining_ , 2021, pp. 18–22.
  * [5] R. F. Mello and M. A. Ponti, _Machine Learning: A Practical Approach on the Statistical Learning Theory_. Springer, 2018.
  * [6] K. Vodrahalli, K. Li, and J. Malik, “Are all training examples created equal? an empirical study,” _arXiv e-prints_ , pp. arXiv–1811, 2018.
  * [7] B. Sorscher, R. Geirhos, S. Shekhar, S. Ganguli, and A. S. Morcos, “Beyond neural scaling laws: beating power law scaling via data pruning,” _arXiv preprint arXiv:2206.14486_ , 2022.
  * [8] T. Zhou, S. Wang, and J. Bilmes, “Curriculum learning by dynamic instance hardness,” _Advances in Neural Information Processing Systems_ , vol. 33, pp. 8602–8613, 2020.
  * [9] B. Saha and D. Srivastava, “Data quality: The other face of big data,” in _2014 IEEE 30th international conference on data engineering_. IEEE, 2014, pp. 1294–1297.
  * [10] S. Hao, P. Li, R. Wu, and X. Chu, “A model-agnostic approach for learning with noisy labels of arbitrary distributions,” in _2022 IEEE 38th International Conference on Data Engineering (ICDE)_. IEEE, 2022, pp. 1219–1231.
  * [11] T. Chen and C. Guestrin, “Xgboost: A scalable tree boosting system,” in _Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining_ , 2016, pp. 785–794.
  * [12] G. Ke, Q. Meng, T. Finley, T. Wang, W. Chen, W. Ma, Q. Ye, and T.-Y. Liu, “Lightgbm: A highly efficient gradient boosting decision tree,” _Advances in neural information processing systems_ , vol. 30, 2017.
  * [13] S. Swayamdipta, R. Schwartz, N. Lourie, Y. Wang, H. Hajishirzi, N. A. Smith, and Y. Choi, “Dataset cartography: Mapping and diagnosing datasets with training dynamics,” in _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , 2020, pp. 9275–9293.
  * [14] R. Shwartz-Ziv and A. Armon, “Tabular data: Deep learning is not all you need,” _Information Fusion_ , vol. 81, pp. 84–90, 2022.
  * [15] D. Hovy, T. Berg-Kirkpatrick, A. Vaswani, and E. Hovy, “Learning whom to trust with mace,” in _Proceedings of the 2013 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , 2013, pp. 1120–1130.
  * [16] A. C. Lorena, L. P. Garcia, J. Lehmann, M. C. Souto, and T. K. Ho, “How complex is your classification problem? a survey on measuring classification complexity,” _ACM Computing Surveys (CSUR)_ , vol. 52, no. 5, pp. 1–34, 2019\.
  * [17] C. Northcutt, L. Jiang, and I. Chuang, “Confident learning: Estimating uncertainty in dataset labels,” _Journal of Artificial Intelligence Research_ , vol. 70, pp. 1373–1411, 2021.
  * [18] D. Angluin and P. Laird, “Learning from noisy examples,” _Machine Learning_ , vol. 2, no. 4, pp. 343–370, 1988.
  * [19] P. Chen, B. B. Liao, G. Chen, and S. Zhang, “Understanding and utilizing deep neural networks trained with noisy labels,” in _International Conference on Machine Learning_. PMLR, 2019, pp. 1062–1070.
  * [20] G. Patrini, F. Nielsen, R. Nock, and M. Carioni, “Loss factorization, weakly supervised learning and label noise robustness,” in _International conference on machine learning_. PMLR, 2016, pp. 708–717.
  * [21] N. Natarajan, I. S. Dhillon, P. K. Ravikumar, and A. Tewari, “Learning with noisy labels,” _Advances in neural information processing systems_ , vol. 26, 2013.
  * [22] G. Pleiss, T. Zhang, E. Elenberg, and K. Q. Weinberger, “Identifying mislabeled data using the area under the margin ranking,” _Advances in Neural Information Processing Systems_ , vol. 33, pp. 17 044–17 056, 2020.
  * [23] Y. Shen and S. Sanghavi, “Learning with bad training data via iterative trimmed loss minimization,” in _International Conference on Machine Learning_. PMLR, 2019, pp. 5739–5748.
  * [24] S. Liu, J. Niles-Weed, N. Razavian, and C. Fernandez-Granda, “Early-learning regularization prevents memorization of noisy labels,” _Advances in neural information processing systems_ , vol. 33, pp. 20 331–20 342, 2020.
  * [25] M. Toneva, A. Sordoni, R. T. d. Combes, A. Trischler, Y. Bengio, and G. J. Gordon, “An empirical study of example forgetting during deep neural network learning,” _arXiv preprint arXiv:1812.05159_ , 2018.
  * [26] V. Feldman, “Does learning require memorization? a short tale about a long tail,” in _Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing_ , 2020, pp. 954–959.
  * [27] Y. Li and N. Vasconcelos, “Repair: Removing representation bias by dataset resampling,” in _Proceedings of the IEEE/CVF conference on computer vision and pattern recognition_ , 2019, pp. 9572–9581.
  * [28] M. A. Ponti, F. P. dos Santos, L. S. Ribeiro, and G. B. Cavallari, “Training deep networks from zero to hero: avoiding pitfalls and going beyond,” in _2021 34th SIBGRAPI Conference on Graphics, Patterns and Images (SIBGRAPI)_. IEEE, 2021, pp. 9–16.
  * [29] A. Ghosh, N. Manwani, and P. Sastry, “On the robustness of decision tree learning under label noise,” in _Pacific-Asia Conference on Knowledge Discovery and Data Mining_. Springer, 2017, pp. 685–697.


# Counterdiabatic driving for long-lived singlet state preparation

Abhinav Suresh<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Vishal Varma  Priya Batra  T S Mahesh  Department of
Physics and NMR Research Center,
Indian Institute of Science Education and Research, Pune 411008, India

###### Abstract

The quantum adiabatic method, which maintains populations in their
instantaneous eigenstates throughout the state evolution, is an established
and often preferred choice for state preparation and manipulation. Though it
minimizes the driving cost significantly, its slow speed is a severe
limitation in noisy intermediate-scale quantum (NISQ) era technologies. Since
adiabatic paths are extensive in many physical processes, it is of broader
interest to achieve adiabaticity at a much faster rate. Shortcuts to
adiabaticity techniques which overcome the slow adiabatic process by driving
the system faster through non-adiabatic paths have seen increased attention
recently. The extraordinarily long lifetime of the long-lived singlet states
(LLS) in nuclear magnetic resonance, established over the past decade, has
opened several important applications ranging from spectroscopy to biomedical
imaging. Various methods, including adiabatic methods, are already being used
to prepare LLS. In this article, we report the use of counterdiabatic driving
(CD) to speed up LLS preparation with faster drives. Using NMR experiments, we
show that CD can give stronger LLS order in shorter durations than
conventional adiabatic driving.

††preprint: AIP/123-QED

##  I Introduction:

Adiabatic driving (AD) is the process used to control the dynamics of a
quantum system by tuning parameters of the driving Hamiltonian slowly enough
that the system continuously remains in its instantaneous eigenstate
born1928beweis . This means the system is driven through a sequence of
equilibrium states without generating excitations or heat. Such processes are
ubiquitous in physics and find a wide range of applications in internal
population control2003JPCA..107.9937D , state preparation Rodin_2019 , ion
transport in ion traps article1 , quantum computation farhi2000quantum ,
quantum simulations Babbush_2014 , in the study of quantum Hall
effectcmp/1104159167  etc.

In order to ensure that the system remains in the instantaneous ground state,
AD should be as slow as possible De_Grandi_2010 . This could be a significant
disadvantage for noisy intermediate-scale quantum (NISQ) devices which are
sensitive to the environment and are much more prone to decoherence. To
overcome this limitation of AD, several shortcuts to adiabaticity
(STA)PhysRevLett.104.063002 ; RevModPhys.91.045001 ; PhysRevLett.105.123003
techniques have been proposed. STA helps in driving a system from an initial
state to the desired state at a faster rate yet preserving the overall
adiabaticity. Counterdiabatic driving (CD) or transitionless-quantum driving
Berry_2009  is one such STA method that allows us to engineer the suppression
of diabatic transitions caused by faster driving. The central idea of CD is to
find an auxiliary Hamiltonian that suppresses the undesirable diabatic
transitions by suitably modifying the energy gaps as the system evolves
Campo2013ShortcutsTA  (see Fig. 1). CD finds its importance in studying
quantum dynamics at a timescale smaller than the decoherence time and has been
studied in various systems, including quantum heat engines beau2016scaling ;
PhysRevE.98.032121 , quantum refrigerators Funo_2019 , non-equilibrium
thermodynamics PhysRevE.99.022110 ; PhysRevE.99.032108 , circuit QED Yin_2022
, and even in evolutionary biologyIram_2020 . It has been advantageous in
quantum annealing PhysRevA.95.012309 ; PhysRevResearch.2.013283 , universal
quantum computing Santos2015SuperadiabaticCE , population
transferdoi:10.1021/jp030708a , studying quantum many-body dynamics
PhysRevA.90.060301 ; PhysRevLett.109.115703 ; Hartmann_2019 , in detection of
quantum phase transitions PhysRevA.103.012220  and in quantum approximate
algorithms PhysRevX.11.031070 ; Wurtz2022counterdiabaticity ;
PhysRevResearch.4.013141 ; PhysRevA.105.042415 ; PhysRevResearch.4.043204 .

Figure 1: CD pulls the energy levels apart and widens the gap that could be
adiabatically traversed faster.

Long-lived singlet states (LLS) are of extreme interest to physicists as well
as spectroscopists because of their minimal vulnerability to environmental
noise. While LLS has been discovered carravetta2004beyond  and extensively
studied pileio2020long  in nuclear magnetic resonance (NMR), similar states
have also been explored in other architectures PhysRevB.95.224105 ;
doi:10.1126/sciadv.aax4482 . The long-livedness of LLS arises because the
antisymmetric singlet state can not couple with symmetric triplet states via
symmetry-preserving noise processes such as spin-lattice relaxation mediated
by intramolecular dipole-dipole interaction doi:10.1021/ja0490931 . LLS states
are important in a number of scientific areas, including quantum computing,
quantum cryptography, and spectroscopy. Efficient methods for the creation and
manipulation of LLS have applications in medical imaging theis2016direct ;
bae201815n4 ; gloggler2017versatile ; mamone2018nuclear , MRI contrast
techniquehttps://doi.org/10.1002/anie.202014933 , quantum computation
PhysRevA.82.052302 , biomolecular NMR salvi2012boosting ; buratto2014drug ;
buratto2014exploring ; buratto2016ligand  etc.

The generation of non-equilibrium nuclear singlet states was first
demonstrated in weakly coupled molecules by Carravetta and
Levittdoi:10.1021/ja0490931 . Since then, several methods pileio2020long ,
including an adiabatic method Rodin_2019  for LLS preparation, have been
proposed and demonstrated. In this article, we report the use of CD for faster
LLS generation.

In Sec. II, we first explain the theoretical framework of adiabatic driving
(AD), followed by a brief theory of CD. In Sec. III, we apply CD on a two-
qubit system, provide numerical and experimental simulations of the CD pulse
sequence, and discuss their results. Finally, we summarize and conclude in
Sec. IV.

##  II Theory

###  II.1 Adiabatic driving (AD)

Let us consider a time-dependent Hamiltonian $H(t)$ with instantaneous
eigenvalues $\\{E_{n}(t)\\}$ and eigenstates $\\{\ket{n(t)}\\}$. A general
instantaneous state $\ket{\Psi(t)}$ can be expanded in the complete
eigenbasis, in $\hbar=1$ units, as

$\displaystyle\ket{\Psi(t)}=\sum_{n}c_{n}(t)e^{i\theta_{n}(t)}\ket{n(t)},~{}\mbox{where}~{}\theta_{n}(t)=-\int_{0}^{t}dt^{\prime}E_{n}(t^{\prime}).$
(1)

We now try to follow the dynamics of coefficients $c_{n}(t)$. Substituting the
above in Schrödinger equation

$\displaystyle i\frac{\partial}{\partial t}\ket{\Psi(t)}=H(t)\ket{\Psi(t)},$
(2)

we obtain

$\displaystyle
i\sum_{n}\left[\dot{c_{n}}\ket{n}+{c_{n}}\ket{\dot{n}}+i\dot{\theta}_{n}{c_{n}}\ket{n}\right]e^{i\theta_{n}}$
$\displaystyle=\sum_{n}E_{n}c_{n}\ket{n}e^{i\theta_{n}},$
$\displaystyle\mbox{or,}~{}~{}\sum_{n}\left[\dot{c_{n}}\ket{n}+{c_{n}}\ket{\dot{n}}\right]e^{i\theta_{n}}$
$\displaystyle=0.$
$\displaystyle\therefore~{}~{}\sum_{n}\left[\dot{c_{n}}\langle{m}|{n}\rangle+{c_{n}}\langle{m}|{\dot{n}}\rangle\right]e^{i\theta_{n}}$
$\displaystyle=0,$
$\displaystyle\mbox{i.e.,}~{}\dot{c_{m}}=-{c_{m}}\langle{m}|{\dot{m}}\rangle-\sum_{n\neq
m}{c_{n}}\langle{m}|{\dot{n}}\rangle e^{i(\theta_{n}-\theta_{m})}.$ (3)

To determine $\langle{m}|{\dot{n}}\rangle$ for nondegenerate levels $m\neq n$,
we differentiate the Schrödinger equation $H\ket{n}=E_{n}\ket{n}$ and take
inner product with $\ket{m}$,

$\displaystyle\langle{m}|{\dot{H}}|{n}\rangle+E_{m}\langle{m}|{\dot{n}}\rangle$
$\displaystyle=\dot{E}_{m}\langle{m}|{n}\rangle+E_{n}\langle{m}|{\dot{n}}\rangle,$
$\displaystyle\mbox{or}~{}~{}\langle{m}|{\dot{n}}\rangle$
$\displaystyle=\frac{\langle{m}|{\dot{H}}|{n}\rangle}{E_{n}-E_{m}}.$ (4)

The adiabatic approximation involves setting griffiths2018introduction

$\displaystyle\dfrac{|\langle{m(t)}|{\dot{H}(t)}|{n(t)}\rangle|}{|E_{n}(t)-E_{m}(t)|}\approx
0~{}~{}\mbox{for all $t$, s.t. Eq. \ref{eq:ad1} yields}$ (5)
$\displaystyle\dot{c_{m}}=-c_{m}\langle{m}|{\dot{m}}\rangle,~{}~{}\mbox{with
solution}~{}c_{m}(t)=c_{m}(0)e^{i\gamma_{m}(t)},~{}$
$\displaystyle\mbox{where}~{}\gamma_{m}(t)\approx
i\int_{0}^{t}dt^{\prime}\langle m(t^{\prime})|\dot{m}(t^{\prime})\rangle.$ (6)

In the above, $\theta_{n}$ and $\gamma_{n}$ are the dynamical and geometric
phases, respectively. If the system starts from $\ket{n(0)}$, such that
$c_{n}(0)=1$ and $c_{m}(0)=0$ for all $m\neq n$, then we obtain

$\ket{\Psi(t)}=e^{i\theta_{n}(t)}e^{i\gamma_{n}(t)}\ket{n(t)}.$ (7)

Our goal is an adiabatic evolution of a system that starts from an eigenstate
of a given initial Hamiltonian $H_{I}$ at $t=0$ and reaches the corresponding
eigenstate of the final Hamiltonian $H_{F}$ at time $t=T$. The instantaneous
adiabatic Hamiltonian is parameterized as

$\displaystyle H_{AD}(t)=(1-\lambda(t))H_{I}+\lambda(t)H_{F},$ (8)

where $\lambda(0)=0$ and $\lambda(T)=1$. This way, one can tune the
Hamiltonian from the initial form $H_{I}$ to the final form $H_{F}$ via the
scalar parameter $\lambda$. However, this must be done slowly to satisfy
adiabaticity. In the following, we discuss the CD method, which overcomes this
limitation.

###  II.2 Counterdiabatic driving (CD)

Although adiabatic control has its merits, the adiabatic approximation limits
the maximum speed of the drive. If the drive Hamiltonian $H_{AD}(t)$ varies
too fast compared to the energy difference so that the adiabatic approximation
of Eq. 5 is not satisfied, then undesired diabatic transitions may occur. CD
helps in the suppression of diabatic transitions due to the fast driving, and
thereby, it allows for shorter control sequences. Let $U_{\lambda}$ be the
change of basis operator to the moving frame generated by $H_{AD}$. The
transformation to the moving frame (denoted by $\sim$) and corresponding
Schrödinger equation can be written as geometrycd

$\displaystyle\ket{\Psi(t)}$
$\displaystyle=U_{\lambda}\ket{\widetilde{\Psi}(t)}~{}\mbox{and}$
$\displaystyle i\frac{\partial}{\partial
t}U_{\lambda}\ket{\widetilde{\Psi}(t)}$
$\displaystyle=H_{AD}U_{\lambda}\ket{\widetilde{\Psi}(t)},$
$\displaystyle\mbox{i.e.,}~{}~{}i\left[\dot{\lambda}\frac{\partial
U_{\lambda}}{\partial\lambda}\ket{\widetilde{\Psi}}+U_{\lambda}\frac{\partial\ket{\widetilde{\Psi}}}{\partial
t}\right]$ $\displaystyle=H_{AD}U_{\lambda}\ket{\widetilde{\Psi}(t)}.$ (9)

Multiplying both sides by $U_{\lambda}^{\dagger}$ and rearranging terms, we
get Schrödinger equation in the moving frame

$\displaystyle i\frac{\partial\ket{\widetilde{\Psi}(t)}}{\partial t}$
$\displaystyle=\widetilde{H}_{AD}\ket{\widetilde{\Psi}(t)},$
$\displaystyle\mbox{where}~{}~{}\widetilde{H}_{AD}$
$\displaystyle=U_{\lambda}^{\dagger}H_{AD}U_{\lambda}-i\dot{\lambda}U_{\lambda}^{\dagger}\frac{\partial
U_{\lambda}}{\partial\lambda}.$ (10)

Since $U_{\lambda}$ is generated by $H_{AD}$, the effective Hamiltonian in the
moving frame is of the form

$\displaystyle\widetilde{H}_{AD}(t)=H_{AD}(t)-\dot{\lambda}A_{\lambda}(t),~{}~{}\mbox{where}~{}~{}A_{\lambda}=iU_{\lambda}^{\dagger}\frac{\partial
U_{\lambda}}{\partial\lambda}$ (11)

is the adiabatic gauge potential. In general, a gauge potential generates
translations in the parameter space. The second term
$-\dot{\lambda}A_{\lambda}$ arises from the non-inertial frame transformation
and is responsible for the diabatic evolution. This could be seen by taking
the matrix element of $A_{\lambda}$ in the lab frame geometrycd , namely

$\displaystyle\langle{m}|{A_{\lambda}|n}\rangle=i\frac{\langle{m}|{\partial_{\lambda}H|n}\rangle}{E_{n}-E_{m}}$
(12)

which is nothing but $\langle{m}|{\dot{n}}\rangle$ parameterized by $\lambda$
in Eq. 4. To counter these diabatic transitions we add the same term
$\dot{\lambda}A_{\lambda}(t)$ to the lab-frame control Hamiltonian $H_{AD}$ to
form total Hamiltonian geometrycd

${H_{CD}(t)}=H_{AD}(t)+H_{\lambda}(t),~{}~{}\mbox{where}~{}~{}H_{\lambda}(t)=\dot{\lambda}(t)A_{\lambda}(t).$
(13)

Here $H_{\lambda}(t)$ is the correction term which ensures that the
eigenstates of the total Hamiltonian $H_{CD}$ are of the form given in Eq. 7
because it renders the total moving frame Hamiltonian to be diagonal and
inertial. This way, the diabatic transitions are suppressed in CD by finding
the appropriate adiabatic gauge potential.

In general, setting up the exact gauge potential requires complete spectral
knowledge at every instant of time. It satisfies the condition geometrycd

$\displaystyle\left[H_{AD},M_{\lambda}\right]=0,~{}~{}\mbox{where}~{}~{}M_{\lambda}=\frac{\partial
H_{AD}}{\partial\lambda}-i[H_{AD},A_{\lambda}].$ (14)

But, since the form of $\lambda$ is not known apriori, it is essentially an
optimization problem. For a chosen ansatz of $\lambda$, an approximate form of
the adiabatic gauge potential up to first-order variational coefficient
$\alpha$ is Claeys2019FloquetEngineeringCP

$\displaystyle A^{{}^{(1)}}_{\lambda}$
$\displaystyle=i\alpha\left[H_{AD},\frac{\partial
H_{AD}}{\partial\lambda}\right]$
$\displaystyle=i\alpha\left[H_{AD},(H_{F}-H_{I})\right]=i\alpha\left[H_{I},H_{F}\right],~{}~{}\mbox{such
that}$ $\displaystyle[H_{AD},G_{\lambda}]$ $\displaystyle\approx
0,~{}~{}\mbox{where}~{}~{}G_{\lambda}=\frac{\partial
H_{AD}}{\partial\lambda}-i[H_{AD},A^{{}^{(1)}}_{\lambda}].$ (15)

In order to find the optimal $A_{\lambda}^{(1)}$, we find an appropriate
variational coefficient $\alpha$ that minimizes the trace distance between
$M_{\lambda}$ and $G_{\lambda}$. This minimization was shown to be equivalent
to minimizing the action geometrycd

$\displaystyle S$
$\displaystyle=\mathrm{Tr}\left(G_{\lambda}^{2}\right)=\mathrm{Tr}\left((H_{F}-H_{I}+\alpha\left[H_{AD},\left[H_{I},H_{F}\right]\right]\right)^{2}).$
(16)

In the following, we describe implementing the above protocol on a two-qubit
system.

###  II.3 AD and CD on a two-qubit system

We now consider a two-qubit system with Hamiltonian,

$\displaystyle H_{I}=-\pi\delta\left(I_{1z}-I_{2z}\right)+2\pi
J\mathbf{I}_{1}\cdot\mathbf{I}_{2},$ (17)

where $\mathbf{I}_{i}$ are the vector spin operators with components
$I_{i\beta}$ with $i\in\\{1,2\\}$ and $\beta\in\\{x,y,z\\}$.

We first set up $H_{AD}$ in the form of Eq. 8 with the final Hamiltonian

$\displaystyle H(T)=H_{F}=2\pi J\mathbf{I}_{1}\cdot\mathbf{I}_{2}.$ (18)

The control parameter $\lambda$ should obey the STA conditions
PhysRevA.83.013415 ,

$\displaystyle\lambda(0)=0,~{}\lambda(T)=1,~{}\dot{\lambda}(0)=\dot{\lambda}(T)=\ddot{\lambda}(0)=\ddot{\lambda}(T)=0.$
(19)

An anzast that satisfies these conditions is _epait__2023

$\lambda(t)={\sin^{2}\left(\frac{\pi}{2}\sin^{2}\frac{\pi\,t}{2\,T}\right)}.$
(20)

Fig. 2 (a) represents the evolution of all the four eigenvalues of $H_{AD}(t)$
(see Eq. 8) for the above forms of $H_{I}$, $H_{F}$, and $\lambda(t)$. Here
the initial ground state is $\ket{01}$ in the computational basis. As desired,
the ground state of the final Hamiltonian $H_{F}$ is the singlet state,

$\displaystyle\ket{S_{0}}=\frac{\ket{01}-\ket{10}}{\sqrt{2}}.$ (21)

Note that the ground state always remains nondegenerate, even for the final
Hamiltonian $H_{F}$ (see inset of Fig. 2 (a)). However, it is clear that the
energy gap between the ground state and the excited states decreases
asymptotically, thereby limiting the speed of the AD drive.

Figure 2: Evolution of eigenvalues for (a) AD (b) CD. In (b), five sets of
eigenvalues correspond to the total time $T=\\{0.01,0.05,0.1,0.3,0.5\\}$,
$\delta=90.7$ Hz, and $J=3.24$ Hz. The furthest stretched-out eigenvalues
correspond to the shortest $T$. AD eigenvalues have no visible change w.r.t.
$T$. The inset shows a zoomed-in portion from 0.8 to 1 t/T where the energy
gap is visible. Figure 3: Evolution of (a) the dynamical phase and (b) the
geometric phase for simulation parameters $T=0.01$, $N=30$, $\delta=90.7$ Hz,
and $J=3.24$ Hz.

Now we shall construct the CD drive. For the above system and the form of
$\lambda(t)$ in Eq. 20, the first-order adiabatic gauge potential from Eq. 15
becomes

$\displaystyle A_{\lambda}(t)$ $\displaystyle=i\alpha(t)[H_{I},H_{F}]$
$\displaystyle=-4\pi^{2}(\delta)(J)\alpha(t)(I_{1x}I_{2y}-I_{1y}I_{2x}).$ (22)

On minimizing the action $S$ via Eq. 16 we obtain the first-order variational
coefficient $\alpha$ as

$\displaystyle\alpha(t)=\frac{1}{4\pi^{2}\\{4\delta^{2}(\lambda(t)-1)^{2}+J^{2}\\}}.$
(23)

Now, using Eqs. 22 and 23 in Eq. 13, we get the auxiliary term $H_{\lambda}$
as

$\displaystyle H_{\lambda}(t)$
$\displaystyle=\kappa(t)(I_{1x}I_{2y}-I_{1y}I_{2x}),~{}~{}\mbox{where}$
$\displaystyle\kappa(t)$
$\displaystyle=\frac{-\accentset{\mbox{\small.}}{\lambda}(t)\delta
J}{4\delta^{2}(\lambda(t)-1)^{2}+J^{2}}$ (24)

is the amplitude of the $H_{\lambda}$ drive. By adding this to $H_{AD}$, we
obtain $H_{CD}$ that would enable faster driving without diabatic transitions.
To understand this improvement, we look at the evolution of all the
eigenvalues of $H_{CD}(t)$ for different total times $T$ represented in Fig. 2
(b). It is evident that, compared to the AD case, the energy levels are pulled
apart, facilitating faster driving. In fact, the effect is more dramatic as
$T$ becomes shorter. This behaviour explains why CD can be advantageous for
faster state preparations.

Fig. 3 shows the evolution of dynamical phase $\theta_{\ket{01}}(t)$ and
geometric phase $\gamma_{\ket{01}}(t)$ for the two-qubit system. As expected,
the dynamical phase shows a strong peak coinciding with the widening of the
energy gap in Fig. 2. Interestingly, the geometric phase has no such strong
feature.

##  III Simulations and Experiments

###  III.1 Two-qubit NMR system

Figure 4:  (a) Spectra of 2-Chloroacrylonitrile (CAN), (b) LLS spectrum with
AD ($T=0.1$ s, $N=15$, $\tau_{S}=30$ s), (c) LLS spectrum with CD ($T=0.5$ s,
$N=30$, $\tau_{S}=30$ s)

Our two-qubit sample consists of $20\mu l$ of 2-chloroacrylonitrile (CAN)
dissolved in $600\mu l$ deuterated dimethylsulphoxide (DMSO). We treat the two
spin-1/2 protons of CAN as two qubits (see inset of Fig. 4 (a)). The
experiments were carried out on a Bruker 500 MHz NMR spectrometer at an
ambient temperature of 300 K. The rotating frame Hamiltonian of the two-qubit
system is the same form as Eq. 17, with $\delta=90.7$ Hz being the chemical
shift difference and $J=3.24$ Hz being the strength of the indirect spin-spin
interaction. The one-pulse 1H spectrum of CAN is shown in Fig. 4 (a).

###  III.2 The NMR pulse-sequence

The NMR pulse sequence is schematically illustrated in Fig. 5. It has the
following stages.

Figure 5: a) Total pulse sequence, b) AD Pulse sequence, c) CD pulse sequence,
where $\tau_{S}$ is the storage time. The filled rectangles correspond to
WALTZ-16 sequences.

####  III.2.1 Initialization

As seen in Fig. 2, the singlet state $\ket{S_{0}}$ is adiabatically connected
to the ground state $\ket{01}$ of the initial Hamiltonian $H_{I}$. In NMR, the
thermal initial state and the subsequently prepared non-equilibrium states are
highly mixed. In the mixed states

$\displaystyle\rho_{{}_{1}}$
$\displaystyle=I_{1z}-I_{2z}~{}~{}\mbox{and}~{}~{}\rho_{S_{0}}=-\mathbf{I}_{1}\cdot\mathbf{I}_{2},$
(25)

the excess populations are in basis states $\ket{01}$ and the $\ket{S_{0}}$
respectively. As shown in Fig. 5 (a), we use a pair of hard pulses separated
by a delay to prepare the initial state $\rho_{{}_{1}}$ starting from the
thermal state $\rho_{{}_{0}}=I_{1z}+I_{2z}$. The task now is to start from
$\rho_{{}_{1}}$ and reach $\rho_{S_{0}}$ using either AD or CD evolutions,
which are described below.

####  III.2.2 AD and CD evolutions

We first discretize $\lambda$ and $\kappa$ of Eqs. 20 and 24 into $N$ segments
each of duration $\tau_{0}$ such that $N\tau_{0}=T$ and

$\displaystyle\lambda_{n}$
$\displaystyle=\sin^{2}\left(\frac{\pi}{2}\sin^{2}\frac{\pi\,n}{2\,N}\right),~{}~{}\mbox{and}$
$\displaystyle\kappa_{n}$ $\displaystyle=\frac{-\dot{\lambda_{n}}\delta
J}{4\delta^{2}(\lambda_{n}-1)^{2}+J^{2}}.$ (26)

The corresponding piecewise continuous AD and CD Hamiltonians

$\displaystyle H_{AD}^{\lambda_{n}}$
$\displaystyle=(1-\lambda_{n})H_{I}+\lambda_{n}H_{F}~{}~{}\mbox{and}$
$\displaystyle H_{CD}^{\lambda_{n}}$
$\displaystyle=H_{AD}^{\lambda_{n}}+H_{\lambda_{n}},$ (27)

which are the discretized forms of Eqs. 8 and 13.

As illustrated in Fig. 5 (a), the total evolutions under AD and CD can be
expanded in terms of $N$ segments as

$\displaystyle U_{AD}$
$\displaystyle\approx\prod_{n=1}^{N}U_{AD}^{\lambda_{n}},~{}~{}\mbox{where}~{}~{}U_{AD}^{\lambda_{n}}=\exp\left(-iH_{AD}^{\lambda_{n}}\tau_{0}\right)$
$\displaystyle\mbox{and}~{}~{}U_{CD}$
$\displaystyle\approx\prod_{n=1}^{N}U_{CD}^{\lambda_{n}},~{}~{}\mbox{where}~{}~{}U_{CD}^{\lambda_{n}}=\exp\left(-iH_{CD}^{\lambda_{n}}\tau_{0}\right).$
(28)

Figure 6: Numerical simulations of AD (a) and CD (b) evolutions by the pulse
sequences shown in Fig. 5 (b,c), applied on mixed initial states available in
NMR systems. (c) Final fidelity w.r.t. total time $T$ for both AD and CD. The
number of iterations was kept at N=30 for all the simulations.

Now we describe how we can realize the AD and CD segments
$U_{AD}^{\lambda_{n}}$ and $U_{CD}^{\lambda_{n}}$. As shown in Fig. 5 (b), we
stack a pair of AD sequences, between which the auxiliary unitary for CD can
be inserted. This allows a straightforward comparison between the two methods.
To this end, we set up AD and CD segments in the form

$\displaystyle U_{AD}^{\lambda_{n}}$
$\displaystyle=U_{AD}^{\lambda_{n}/2}~{}\mathbbm{1}~{}U_{AD}^{\lambda_{n}/2}~{}~{}\mbox{and}$
$\displaystyle U_{CD}^{\lambda_{n}}$
$\displaystyle=U_{AD}^{\lambda_{n}/2}~{}W^{\lambda_{n}}~{}U_{AD}^{\lambda_{n}/2},$
(29)

where $\mathbbm{1}$ is the identity operator and $W^{\lambda_{n}}$ is the
propagator for the auxiliary Hamiltonian $H_{\lambda_{n}}$ in Eq. 27
implemented via symmetrized Trotter decomposition. The propagator
$U_{AD}^{\lambda_{n}/2}$ for adiabatic evolution in Eq. 8 is implemented again
via symmetrized Trotter decomposition as follows:

$\displaystyle U_{AD}^{\lambda_{n}/2}$
$\displaystyle=U_{I}^{{(n)}}~{}U_{F}^{{(n)}}~{}U_{I}^{{(n)}},$ $\displaystyle
U_{I}^{{(n)}}$ $\displaystyle=\exp\left(-iH_{I}\tau_{1}{(n)}\right),$
$\displaystyle U_{F}^{{(n)}}$
$\displaystyle=\exp\left(-iH_{F}\tau_{2}{(n)}\right),$
$\displaystyle\tau_{1}{(n)}$
$\displaystyle=\frac{(1-\lambda_{n})\tau_{0}}{4},~{}~{}\mbox{and}~{}~{}\tau_{2}{(n)}=\frac{\lambda_{n}\tau_{0}}{2}.$
(30)

As mentioned above, $H_{I}$ is the natural NMR Hamiltonian for the weakly
coupled spin pair, and therefore $U_{I}^{(n)}$ is implemented simply with a
delay $\tau_{1}(n)$. An effective $H_{F}$ Hamiltonian is realized by
suppressing the chemical shift. In our experiments, we used WALTZ-16 spin lock
for duration $\tau_{2}(n)$ to implement $U_{F}^{(n)}$.

To implement CD segment, we need to insert $W^{\lambda_{n}}$ as described in
Eq. 27. One way to realize $W^{\lambda_{n}}$ is with the help of an R.F.
rotation $U_{x}^{\alpha}$ followed by chemical shift $U_{\delta}^{\beta}$ and
weakly coupled J-evolution transformations $U_{J}^{\eta}$. These
transformations are of the form

$\displaystyle U_{x}^{\alpha}$
$\displaystyle=\exp\left[-i\alpha(I_{1x}+I_{2x})\right],$ $\displaystyle
U_{\delta}^{\beta}$
$\displaystyle=\exp\left[-i\beta(-I_{1z}+I_{2z})\right],~{}~{}\mbox{and}$
$\displaystyle U_{J}^{\eta}$
$\displaystyle=\exp\left[-i\eta(2I_{1z}I_{2z})\right].$ (31)

The rotation $\alpha$ is realized by a field of amplitude $\nu_{x}\gg\delta$
and duration $\tau_{x}=\alpha/(2\pi\nu_{x})$ applied on both the spins. The
rotation $\beta$ is realized simply by a delay
$\tau_{\delta}=\beta/(\pi\delta)$, by assuming that $\delta\gg J$. The
rotation $\eta$ is realized by a spin-echo sequence
$\tau_{J}\\_U_{x}^{\pi}\\_\tau_{J}$ with the delay $\tau_{J}=\eta/(2\pi J)$.
With these transformations, the auxiliary unitary $W^{\lambda}$ is given by

$\displaystyle
W^{\lambda_{n}}=U_{x}^{\pi/2}~{}U_{J}^{\pi/2}~{}U_{\delta}^{\pi/2}~{}U_{x}^{\kappa_{n}}~{}U_{\delta}^{3\pi/2}~{}U_{J}^{3\pi/2}~{}U_{-x}^{\pi/2}.$
(32)

For systems with $J\ll\delta$, the physical duration of the above unitary is
$\sim 2/J$ for each iterative segment. Considering the finite relaxation times
of the system, this sequence may be prohibitively long when incorporated in
the iterative CD sequence of Eq. 28, and therefore we discard this method.

A much shorter but approximate sequence (which is accurate up to an extra
$I_{1z}I_{2z}$ term) is

$\displaystyle W^{\lambda_{n}}\sim
U_{\delta}^{\pi/4}~{}U_{F}^{\kappa_{n}}~{}U_{\delta}^{3\pi/4}.$ (33)

Here $U_{F}^{\kappa}$ is realised by WALTZ-16 spin lock of amplitude $\nu_{F}$
for a duration of $\kappa_{n}/(2\pi\nu_{F})$. For $\nu_{F}\gg\delta$, this
sequence takes a duration of only $1/\delta$, which is much shorter than the
one described in Eq. 32. This sequence, illustrated in Fig. 5 (c), is used in
our experiments.

First, we numerically simulate the ideal unitary evolution from the pure
ground state of $H_{I}$, keeping fidelity

$\displaystyle
F_{LLS}(t)=\left|\frac{\mathrm{Tr}[\rho(t)~{}\rho_{S_{0}}]}{\sqrt{\mathrm{Tr}[\rho^{2}(t)]~{}\mathrm{Tr}[\rho^{2}_{S_{0}}]}}\right|$
(34)

of the instantaneous state $\rho(t)$ with LLS $\rho_{S_{0}}$ as a benchmark
for state evolution.

Here $\rho(t)$ is either

$\displaystyle\rho^{AD}(t)$
$\displaystyle=\prod_{n=1}^{N}U_{AD}^{\lambda_{n}}~{}\rho_{1}~{}{(U_{AD}^{\lambda_{n}})}^{\dagger},~{}~{}\mbox{or},$
$\displaystyle\rho^{CD}(t)$
$\displaystyle=\prod_{n=1}^{N}U_{CD}^{\lambda_{n}}~{}\rho_{1}~{}{(U_{CD}^{\lambda_{n}})}^{\dagger}.$
(35)

We numerically simulate the pulse sequences in Fig. 5 (b,c) for five different
values of the total time duration $T$. The results for AD and CD are shown
respectively in Figs. 6 (a) and (b). Fig. 6 (c) plots the final fidelity of
LLS for each value of $T$. It is clear that the fidelity of LLS in CD raises
quickly with $T$. However for long total durations of $T$, the evolution is
sufficiently adiabatic, and the superiority of CD over AD fades away.

####  III.2.3 LLS storage and detection

We now store the LLS for a storage time $\tau_{S}$ under isotropic Hamiltonian
$H_{F}$ again using a WALTZ-16 spinlock. Finally, we detect LLS after
converting it into observable single-quantum magnetization
$I_{1x}I_{2z}-I_{1z}I_{2x}$ using a delay and $(\pi/2)$ pulse as shown in Fig.
5 (a). This produces a characteristic anti-phase signal as shown in Fig. 4 (b)
and (c). In the following, we benchmark the performance of our CD pulse
sequence (5 (c)) with the AD sequence (5 (b)) via liquid-state NMR
experiments.

###  III.3 Experimental results

The physical implementation times of AD and CD evolutions are (see Fig. 5 and
Eq. 30)

$\displaystyle T^{AD}(\tau_{0})$
$\displaystyle=\sum_{n=1}^{N}\left(4\tau_{1}(n)+2\tau_{2}(n)\right)=N\tau_{0}=T,~{}~{}\mbox{and}$
$\displaystyle T^{CD}(\tau_{0})$
$\displaystyle=N\tau_{0}\left[1+\frac{1}{\delta\tau_{0}}+\frac{1}{N}\sum_{n=1}^{N}\kappa_{n}\right]=f_{\delta,J,N,T}T.$
(36)

In our experiments, the factor $f_{\delta,J,N,T}$ ranged from 1.9 to 72.5. For
a fair comparison, we adjusted $\tau_{0}$ independently in AD and CD
experiments to ensure that the physical implementation time durations of AD
evolution matched that of CD evolution, i.e., $T^{AD}=T^{CD}$. The barplot of
Fig. 7 (a) compares the experimental LLS signals of AD and CD for the same set
of total durations $T$ as in the numerical simulations shown in Fig. 6. Each
bar is obtained by averaging five experiments corresponding to different
iteration numbers $N\in\\{10,15,20,25,30\\}$. We find that CD performs better
than AD at shorter times, as predicted by the numerical simulations in Fig. 6.
At the larger total time $T=0.5$ s, CD appears to outperform AD, again in
agreement with the numerical simulation. However, at intermediate times, AD
seems to perform better.

The barplot of Fig. 7 (b) compares the experimental LLS signals of AD and CD
for the same set of the total number of iterations $N$, wherein each bar is
obtained by averaging five different experiments corresponding to different
total times $T\in\\{0.01,0.05,0.1,0.3,0.5\\}$. In Fig. 7 (b), we see a similar
trend as in Fig. 7 (a), and CD performs better at low and high iteration
numbers while AD performs better at intermediate iteration numbers. We find
that the performances of AD and CD are complementary to each other. The
deviations from the simulations in Fig. 6 could be due to the truncated
WALTZ-16 cycles during CD segments and and other experimental imperfections
such as RF inhomogeneity, spin relaxation, etc. which were not accounted for
in numerical simulations.

Fig. 7 (c) shows the LLS signal as a function of the storage time. The LLS
decay-constant is 27.3 s, which is over five times the longitudinal relaxation
time-constant $T_{1}$ of 5.1 s for individual spins, confirming the long-
livedness of the singlet state.

Figure 7: (a,b) Comparison of performances of AD and CD for (a) varying total
time $T$, obtained by averaging signal intensities from five different
experiments with different iteration number $N$ and (b) varying iteration
number $N$ obtained by averaging signal intensities from five different
experiments with different total time $T$. As in simulations of Figs. 2 and 6,
we have kept $T\in\\{0.01,0.05,0.1,0.3,0.5\\}$ and $N\in\\{10,15,20,25,30\\}$.
The storage time $\tau_{s}$ was kept at 30s for all experiments. (c) Decay of
LLS with the storage time $\tau_{s}$ showing the LLS lifetime of 27.3 s.

##  IV Conclusions

Adiabatic driving (AD) is important for numerous applications, from
spectroscopy to upcoming quantum technologies. However, ensuring no
transitions and maintaining adiabaticity often requires long driving
durations. This can be a significant limitation for many applications,
including today’s noisy intermediate-scale quantum (NISQ) technologies. One
promising way to overcome this limitation is to employ shortcuts to
adiabaticity (STA) protocols. Counterdiabatic driving (CD) is a type of STA
protocol that involves including an auxiliary component to the driving
Hamiltonian to cancel the diabatic transitions by maintaining the moving frame
Hamiltonian to be diagonal and inertial.

In this work, after a brief review of AD, we outlined the theory of CD, and
explained it using a simple two-qubit system. We compared the evolution of
eigenvalues under the AD and CD evolutions. We observed the widening of energy
gaps in the CD evolution, which explains how CD can avoid diabatic transitions
even at faster driving.

Using a two-qubit NMR system, we experimentally studied AD and CD for
preparing long-lived singlet states (LLS). LLS is recently being used for
several spectroscopic and biomedical applications pileio2020long . We
described NMR pulse sequences to initialize, to prepare LLS via AD and CD
evolutions, as well as to convert LLS into observable magnetization. We used
numerical simulations to compare AD and CD pulse decompositions with ideal
evolutions. Finally, we experimentally implemented these sequences on the two-
qubit NMR system over a set of total time durations and a set of the total
number of iterations. The results confirmed that CD achieves better LLS
preparation with faster driving than AD. In general, the performances of AD
and CD were found to be complementary.

Already there are attempts to use deep learning PhysRevX.11.031070 ,
variational methods doi:10.1098/rsta.2021.0282 , and optimal control methods
PhysRevLett.114.177206 ; _epait__2023  to optimize CD paths. We expect such
developments in quantum control with advanced driving strategies to have
important roles in the future.

###### Acknowledgements.

The authors acknowledge valuable discussions with Conan Alexander. A.S.
acknowledges fellowship from KVPY program of DST. V.V. and T.S.M. acknowledge
the funding from DST/ICPS/QuST/2019/Q67. P.B. acknowledges support from the
Prime Minister’s Research Fellowship (PMRF) of the Government of India. We
thank the National Mission on Interdisciplinary Cyber-Physical Systems for
funding from the DST, Government of India, through the I-HUB Quantum
Technology Foundation, IISER-Pune.

## Data Availability Statement

The data that support the findings of this study is available from the
corresponding author upon reasonable request.

## References

  * (1) M. Born and V. Fock, “Beweis des adiabatensatzes,” Zeitschrift für Physik, vol. 51, no. 3-4, pp. 165–180, 1928.
  * (2) M. Demirplak and S. A. Rice, “Adiabatic Population Transfer with Control Fields,” Journal of Physical Chemistry A, vol. 107, pp. 9937–9945, Nov. 2003.
  * (3) B. A. Rodin, K. F. Sheberstov, A. S. Kiryutin, J. T. Hill-Cousins, L. J. Brown, R. C. D. Brown, B. Jamain, H. Zimmermann, R. Z. Sagdeev, A. V. Yurkovskaya, and K. L. Ivanov, “Constant-adiabaticity radiofrequency pulses for generating long-lived singlet spin states in NMR,” The Journal of Chemical Physics, vol. 150, p. 064201, feb 2019.
  * (4) A. Nizamani, B. Rasool, M. Tahir, N. Shaikh, and H. Saleem, “Adiabatic ion shuttling protocols in outer-segmented-electrode surface ion traps,” International Journal of Scientific and Engineering Research, IJSER, ISSN 2229-5518, vol. 4, pp. 3055–3060, 01 2013.
  * (5) E. Farhi, J. Goldstone, S. Gutmann, and M. Sipser, “Quantum computation by adiabatic evolution,” arXiv preprint quant-ph/0001106, 2000.
  * (6) R. Babbush, P. J. Love, and A. Aspuru-Guzik, “Adiabatic quantum simulation of quantum chemistry,” Scientific Reports, vol. 4, oct 2014.
  * (7) J. E. Avron, R. Seiler, and L. G. Yaffe, “Adiabatic theorems and applications to the quantum Hall effect,” Communications in Mathematical Physics, vol. 110, no. 1, pp. 33 – 49, 1987.
  * (8) C. D. Grandi and A. Polkovnikov, “Adiabatic perturbation theory: From landau–zener problem to quenching through a quantum critical point,” in Quantum Quenching, Annealing and Computation, pp. 75–114, Springer Berlin Heidelberg, 2010.
  * (9) X. Chen, A. Ruschhaupt, S. Schmidt, A. del Campo, D. Guéry-Odelin, and J. G. Muga, “Fast optimal frictionless atom cooling in harmonic traps: Shortcut to adiabaticity,” Phys. Rev. Lett., vol. 104, p. 063002, Feb 2010.
  * (10) D. Guéry-Odelin, A. Ruschhaupt, A. Kiely, E. Torrontegui, S. Martínez-Garaot, and J. G. Muga, “Shortcuts to adiabaticity: Concepts, methods, and applications,” Rev. Mod. Phys., vol. 91, p. 045001, Oct 2019.
  * (11) X. Chen, I. Lizuain, A. Ruschhaupt, D. Guéry-Odelin, and J. G. Muga, “Shortcut to adiabatic passage in two- and three-level atoms,” Phys. Rev. Lett., vol. 105, p. 123003, Sep 2010.
  * (12) M. V. Berry, “Transitionless quantum driving,” Journal of Physics A: Mathematical and Theoretical, vol. 42, p. 365303, aug 2009.
  * (13) A. del Campo, “Shortcuts to adiabaticity by counterdiabatic driving.,” Physical Review Letters, vol. 111, pp. 100502–100502, 2013.
  * (14) M. Beau, J. Jaramillo, and A. Del Campo, “Scaling-up quantum heat engines efficiently via shortcuts to adiabaticity,” Entropy, vol. 18, no. 5, p. 168, 2016.
  * (15) O. Abah and E. Lutz, “Performance of shortcut-to-adiabaticity quantum engines,” Phys. Rev. E, vol. 98, p. 032121, Sep 2018.
  * (16) K. Funo, N. Lambert, B. Karimi, J. P. Pekola, Y. Masuyama, and F. Nori, “Speeding up a quantum refrigerator via counterdiabatic driving,” Physical Review B, vol. 100, jul 2019.
  * (17) O. Abah and M. Paternostro, “Shortcut-to-adiabaticity otto engine: A twist to finite-time thermodynamics,” Phys. Rev. E, vol. 99, p. 022110, Feb 2019\.
  * (18) B. i. e. i. f. m. c. Çakmak and O. E. Müstecaplıoğlu, “Spin quantum heat engines with shortcuts to adiabaticity,” Phys. Rev. E, vol. 99, p. 032108, Mar 2019.
  * (19) Z. Yin, C. Li, J. Allcock, Y. Zheng, X. Gu, M. Dai, S. Zhang, and S. An, “Shortcuts to adiabaticity for open systems in circuit quantum electrodynamics,” Nature Communications, vol. 13, jan 2022.
  * (20) S. Iram, E. Dolson, J. Chiel, J. Pelesko, N. Krishnan, Özenç Güngör, B. Kuznets-Speck, S. Deffner, E. Ilker, J. G. Scott, and M. Hinczewski, “Controlling the speed and trajectory of evolution with counterdiabatic driving,” Nature Physics, vol. 17, pp. 135–142, aug 2020.
  * (21) K. Takahashi, “Shortcuts to adiabaticity for quantum annealing,” Phys. Rev. A, vol. 95, p. 012309, Jan 2017.
  * (22) G. Passarelli, V. Cataudella, R. Fazio, and P. Lucignano, “Counterdiabatic driving in the quantum annealing of the $p$-spin model: A variational approach,” Phys. Rev. Res., vol. 2, p. 013283, Mar 2020.
  * (23) A. C. Santos and M. S. Sarandy, “Superadiabatic controlled evolutions and universal quantum computation,” Scientific Reports, vol. 5, 2015.
  * (24) M. Demirplak and S. A. Rice, “Adiabatic population transfer with control fields,” The Journal of Physical Chemistry A, vol. 107, no. 46, pp. 9937–9945, 2003.
  * (25) H. Saberi, T. c. v. Opatrný, K. Mølmer, and A. del Campo, “Adiabatic tracking of quantum many-body dynamics,” Phys. Rev. A, vol. 90, p. 060301, Dec 2014.
  * (26) A. del Campo, M. M. Rams, and W. H. Zurek, “Assisted finite-rate adiabatic passage across a quantum critical point: Exact solution for the quantum ising model,” Phys. Rev. Lett., vol. 109, p. 115703, Sep 2012.
  * (27) A. Hartmann and W. Lechner, “Rapid counter-diabatic sweeps in lattice gauge adiabatic quantum computing,” New Journal of Physics, vol. 21, p. 043025, apr 2019.
  * (28) T. Hatomura and K. Takahashi, “Controlling and exploring quantum systems by algebraic expression of adiabatic gauge potential,” Phys. Rev. A, vol. 103, p. 012220, Jan 2021.
  * (29) J. Yao, L. Lin, and M. Bukov, “Reinforcement learning for many-body ground-state preparation inspired by counterdiabatic driving,” Phys. Rev. X, vol. 11, p. 031070, Sep 2021.
  * (30) J. Wurtz and P. J. Love, “Counterdiabaticity and the quantum approximate optimization algorithm,” Quantum, vol. 6, p. 635, Jan. 2022.
  * (31) P. Chandarana, N. N. Hegade, K. Paul, F. Albarrán-Arriagada, E. Solano, A. del Campo, and X. Chen, “Digitized-counterdiabatic quantum approximate optimization algorithm,” Phys. Rev. Res., vol. 4, p. 013141, Feb 2022.
  * (32) Y. Chai, Y.-J. Han, Y.-C. Wu, Y. Li, M. Dou, and G.-P. Guo, “Shortcuts to the quantum approximate optimization algorithm,” Phys. Rev. A, vol. 105, p. 042415, Apr 2022.
  * (33) N. N. Hegade, P. Chandarana, K. Paul, X. Chen, F. Albarrán-Arriagada, and E. Solano, “Portfolio optimization with digitized counterdiabatic quantum algorithms,” Phys. Rev. Res., vol. 4, p. 043204, Dec 2022.
  * (34) M. Carravetta, O. G. Johannessen, and M. H. Levitt, “Beyond the t 1 limit: singlet nuclear spin states in low magnetic fields,” Physical review letters, vol. 92, no. 15, p. 153003, 2004.
  * (35) G. Pileio, Long-lived nuclear spin order: theory and applications, vol. 22.  Royal Society of Chemistry, 2020.
  * (36) Q. Chen, I. Schwarz, and M. B. Plenio, “Steady-state preparation of long-lived nuclear spin singlet pairs at room temperature,” Phys. Rev. B, vol. 95, p. 224105, Jun 2017.
  * (37) E. Eizner, L. A. Martínez-Martínez, J. Yuen-Zhou, and S. Kéna-Cohen, “Inverting singlet and triplet excited states using strong light-matter coupling,” Science Advances, vol. 5, no. 12, p. eaax4482, 2019.
  * (38) M. Carravetta and M. H. Levitt, “Long-lived nuclear spin states in high-field solution nmr,” Journal of the American Chemical Society, vol. 126, no. 20, pp. 6228–6229, 2004.  PMID: 15149209.
  * (39) T. Theis, G. X. Ortiz Jr, A. W. Logan, K. E. Claytor, Y. Feng, W. P. Huhn, V. Blum, S. J. Malcolmson, E. Y. Chekmenev, Q. Wang, et al., “Direct and cost-efficient hyperpolarization of long-lived nuclear spin states on universal 15n2-diazirine molecular tags,” Science advances, vol. 2, no. 3, p. e1501438, 2016.
  * (40) J. Bae, Z. Zhou, T. Theis, W. S. Warren, and Q. Wang, “15n4-1, 2, 4, 5-tetrazines as potential molecular tags: Integrating bioorthogonal chemistry with hyperpolarization and unearthing para-n2,” Science advances, vol. 4, no. 3, p. eaar2978, 2018.
  * (41) S. Glöggler, S. J. Elliott, G. Stevanato, R. C. Brown, and M. H. Levitt, “Versatile magnetic resonance singlet tags compatible with biological conditions,” RSC advances, vol. 7, no. 55, pp. 34574–34578, 2017.
  * (42) S. Mamone and S. Glöggler, “Nuclear spin singlet states as magnetic on/off probes in self-assembling systems,” Physical Chemistry Chemical Physics, vol. 20, no. 35, pp. 22463–22467, 2018.
  * (43) J. Eills, E. Cavallari, R. Kircher, G. Di Matteo, C. Carrera, L. Dagys, M. H. Levitt, K. L. Ivanov, S. Aime, F. Reineri, K. Münnemann, D. Budker, G. Buntkowsky, and S. Knecht, “Singlet-contrast magnetic resonance imaging: Unlocking hyperpolarization with metabolism**,” Angewandte Chemie International Edition, vol. 60, no. 12, pp. 6791–6798, 2021.
  * (44) S. S. Roy and T. S. Mahesh, “Initialization of nmr quantum registers using long-lived singlet states,” Phys. Rev. A, vol. 82, p. 052302, Nov 2010\.
  * (45) N. Salvi, R. Buratto, A. Bornet, S. Ulzega, I. Rentero Rebollo, A. Angelini, C. Heinis, and G. Bodenhausen, “Boosting the sensitivity of ligand–protein screening by nmr of long-lived states,” Journal of the American Chemical Society, vol. 134, no. 27, pp. 11076–11079, 2012.
  * (46) R. Buratto, A. Bornet, J. Milani, D. Mammoli, B. Vuichoud, N. Salvi, M. Singh, A. Laguerre, S. Passemard, S. Gerber-Lemaire, et al., “Drug screening boosted by hyperpolarized long-lived states in nmr,” ChemMedChem, vol. 9, no. 11, pp. 2509–2515, 2014.
  * (47) R. Buratto, D. Mammoli, E. Chiarparin, G. Williams, and G. Bodenhausen, “Exploring weak ligand–protein interactions by long-lived nmr states: improved contrast in fragment-based drug screening,” Angewandte Chemie International Edition, vol. 53, no. 42, pp. 11376–11380, 2014.
  * (48) R. Buratto, D. Mammoli, E. Canet, and G. Bodenhausen, “Ligand–protein affinity studies using long-lived states of fluorine-19 nuclei,” Journal of Medicinal Chemistry, vol. 59, no. 5, pp. 1960–1966, 2016.
  * (49) D. J. Griffiths and D. F. Schroeter, Introduction to quantum mechanics.  Cambridge university press, 2018.
  * (50) M. Kolodrubetz, P. Mehta, A. Polkovnikov, and D. Sels, “Geometry and non-adiabatic response in quantum and classical systems,” Physics Reports, vol. 697, 02 2016.
  * (51) P. W. Claeys, M. Pandey, D. Sels, and A. Polkovnikov, “Floquet-engineering counterdiabatic protocols in quantum many-body systems.,” Physical review letters, vol. 123 9, p. 090602, 2019.
  * (52) E. Torrontegui, S. Ibáñez, X. Chen, A. Ruschhaupt, D. Guéry-Odelin, and J. G. Muga, “Fast atomic transport without vibrational heating,” Phys. Rev. A, vol. 83, p. 013415, Jan 2011.
  * (53) I. Č epaitė, A. Polkovnikov, A. J. Daley, and C. W. Duncan, “Counterdiabatic optimized local driving,” PRX Quantum, vol. 4, jan 2023\.
  * (54) D. Sun, P. Chandarana, Z.-H. Xin, and X. Chen, “Optimizing counterdiabaticity by variational quantum circuits,” Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, vol. 380, no. 2239, p. 20210282, 2022.
  * (55) S. Campbell, G. De Chiara, M. Paternostro, G. M. Palma, and R. Fazio, “Shortcut to adiabaticity in the lipkin-meshkov-glick model,” Phys. Rev. Lett., vol. 114, p. 177206, May 2015.