2022

[1,2]Bestoun S. Ahmed

1]Department of Mathematics and Computer Science, Karlstad University,
Karlstad, 65188, Sweden

2]Department of Computer Science, Faculty of Electrical Engineering, , Czech
Technical University in Prague, Prague, Czech Republic

# A Domain-Region Based Evaluation of ML Performance Robustness to Covariate
Shift

Firas Bayram<EMAIL_ADDRESS><EMAIL_ADDRESS>[  [

###### Abstract

Most machine learning methods assume that the input data distribution is the
same in the training and testing phases. However, in practice, this
stationarity is usually not met and the distribution of inputs differs,
leading to unexpected performance of the learned model in deployment. The
issue in which the training and test data inputs follow different probability
distributions while the input-output relationship remains unchanged is
referred to as covariate shift. In this paper, the performance of conventional
machine learning models was experimentally evaluated in the presence of
covariate shift. Furthermore, a region-based evaluation was performed by
decomposing the domain of probability density function of the input data to
assess the classifier’s performance per domain region. Distributional changes
were simulated in a two-dimensional classification problem. Subsequently, a
higher four-dimensional experiments were conducted. Based on the experimental
analysis, the Random Forests algorithm is the most robust classifier in the
two-dimensional case, showing the lowest degradation rate for accuracy and
F1-score metrics, with a range between 0.1% and 2.08%. Moreover, the results
reveal that in higher-dimensional experiments, the performance of the models
is predominantly influenced by the complexity of the classification function,
leading to degradation rates exceeding 25% in most cases

###### keywords:

Covariate shift, concept drift, robust machine learning, classifier
evaluation, model degradation

. It is also concluded that the models exhibit high bias towards the region
with high density in the input space domain of the training samples.

##  1 Introduction

Robustness to changes is one of the most exemplary properties of a high-
quality machine learning (ML) model in this ever-shifting world. Maintaining
this property will allow users to work with trustworthy ML systems that
perform consistently and efficiently when exposed to the deployment
environment. The issue arises from the assumption of most ML models that the
data points are independently and identically distributed (i.i.d), which
presume that the data are sampled from the same probability distribution.
However, this assumption is often not satisfied in real-world applications
HEUREUX12017Big . This violation would cause the performance of the predictive
model to degrade substantially in practice. The main reason for this model
degradation is that probability theory forms a central foundation for many
data mining and machine learning techniques WITTEN2017Probabilistic , as it
provides a framework for quantifying uncertainty Brownlee2019Probability .

Changes in the underlying probability distributions have been extensively
studied in the literature Gama2014Adaptation ; Lu2016LearningUnder . The
situation in which there is an inconsistency between the joint probability
distributions $P(x,y)$ of the training and test datasets is called dataset
shift Moreno2012DShift . Researchers have classified the general dataset shift
phenomenon into several types based on the probabilistic source of change.
These types are covariate shift, concept drift and prior probability shift
Raza2015EWMA . Detailed taxonomy and definitions of change types can be found
in our recent overview Bayram2022Degradation . Covariate shift takes the form
of a change between the marginal distributions of the training and test inputs
$P_{tr}(x)$ and $P_{te}(x)$, while the conditional distribution $P(y\mid x)$
remains unchanged Shimodaira2000Covariate ; Sugiyama2012IntroductiontoCS .
Whereas the concurrent occurrence of changes in both marginal and conditional
distributions is called concept drift Tsymbal2004DefandRel . Another type of
dataset shift occurs when the distribution of classes $P(y)$ changes, known as
prior probability shift Tasche2017Fisher . The focus of this paper is on
analyzing the behavior of ML models in covariate shift situations as it is one
of the most common cases in practice Li2020Robust .

Covariate shift could appear in many real-world domains, such as healthcare
systems Subbaswamy2020Development , computer vision Schneider2020Compvision ,
NLP Duchi2019NLP , and social media Fei2015Social . In practice, many sources
cause covariate shift situations. The main reason is that the training input
is not a representative sample of the entire population He2019Unlearn . In
this case, the training samples do not represent the overall problem due to
the biased data collection process towards a specific subpopulation, known as
sample selection bias Wiemann2022Bias , for example, bias towards specific
demographic groups. Therefore, the model will be implemented on an unseen
distribution in deployment, which, as a consequence, would affect the
performance of the model.

Analyzing the out-of-sample performance of ML models before deployment is not
trivial because of the ubiquitousness of the system’s evolution in real-life
applications. The classical way is to perform out-of-sample validation using
held-out datasets through cross-validation or bootstrap techniques. These
techniques assume stationarity in the data distribution of training and test
data. Therefore, they cannot fully estimate the model’s success rate in the
deployment environment where a distributional shift is likely to occur
Tsuboi2009Direct . Another approach to validate the ML models’ performance is
analyzing the accuracy and bias variability across data sub-populations.
Exploring such variability would help diagnose the performance and potentially
develop methods to mitigate its effects.

In this paper, the robustness of several common machine learning algorithms on
synthetic data is evaluated in the presence of covariate shift in binary
classification problems. An overall performance assessment and a region-based
evaluation of the model’s robustness are performed by decomposing the
probability density function (pdf) of the input space domain of the test
samples according to the input density distribution ratio between the test and
training data samples. To this end, the contributions of this paper are
summarized as follows:

  1. 1.

An evaluation framework is presented to assess the robustness of common ML
classifiers in several drift scenarios.

  2. 2.

Comprehensive comparisons and experiments are conducted to measure model
degradation rates under covariate shift in different classification problem
settings.

  3. 3.

Decomposition of the input space based on the ratio of test-to-training input
densities is proposed to evaluate the models’ performance per domain-region.

For the sake of visualization, exhaustive comparison experiments are conducted
on two-dimensional artificial classification problems with covariate shifts
formulated by simulating a broad spectrum of distribution drifts before
evaluating the model robustness using additional higher-dimensional datasets.
The experiments in this paper are designed to address the following primary
research questions:

RQ1: What are the main factors that affect the robustness of performance in
covariate shift problems and lead to model degradation?

RQ2: Which ML classification algorithms tend to be more robust (vulnerable) to
specific problem settings?

RQ3: How does the performance of the classifiers vary in the input space
domain when decomposed by regions based on the test-to-training density ratio?

The remainder of this paper is organized as follows. Section 2 gives a general
background on the covariate shift problem and provides an overview of the
related work. Next, Section 3 contains a detailed explanation of the settings
specified for the experiments. The methodology for the performance evaluation
of the ML models is detailed in Section 4. Section 5 presents the results of
the different experiments. Threats to validity are discussed in Section 6.
Finally, Section 7 concludes the work and sets out future directions for
further extended use of this paper.

##  2 Background and Related Work

This section provides an overview of the covariate shift problem and reviews
the related work to evaluate the robustness of the ML model’s performance
under covariate shift.

###  2.1 Problem Formulation and Notation

In binary classification problems, the goal is to obtain a prediction function
$f:X\longmapsto Y$ that has been trained on training dataset
$\mathcal{D}_{tr}=\left\\{\left(x_{i},y_{i}\right)\right\\}_{i=1}^{N}$ of size
$N$ drawn i.i.d from a joint distribution $p_{tr}(x,y)$, where
$x_{i}\in\mathbb{R}^{d}$ is a $d$-dimensional data instance, or covariates
vector $\mathbf{x}$, and $y_{i}\in\\{-1,+1\\}$ is the class label. The
classifier’s performance is evaluated on a test dataset $\mathcal{D}_{te}$
drawn from a joint distribution $p_{te}(x,y)$. The classical method to learn
the classifier is through solving the following empirical risk minimization
(ERM) problem:

$\small\begin{split}\min_{\theta\in\Theta}R(f)=\min_{\theta\in\Theta}\mathbb{E}_{p_{te}}[\ell(f_{\theta}(x),y)]\approx\\\
\min_{\theta\in\Theta}\frac{1}{N}\sum_{i=1}^{N}\ell\left(f_{\theta}\left(x_{i}\right),y_{i}\right),\end{split}$
(1)

where $\theta$ denotes the parameter vector, $\mathbb{E}_{p_{te}(x,y)}$ is the
expectation over the test distribution $p_{te}(x,y)$, and $\ell$ is a selected
loss function. In stationary distributions, i.e., when $p_{te}(x)=p_{tr}(x)$,
ERM provides a consistent estimator Sugiyama2007ICV . While adaptation
techniques are required for non-stationary distributions, such as covariate
shift situations.

###  2.2 Covariate Shift Adaptation

The minimization problem in Eq. 1 works well under the assumption that
$p_{te}(x,y)$ is the same as $p_{tr}(x,y)$, which usually does not hold in
practice. Thus, an adjustment to ERM introduced in Eq.1 should be performed
for dataset shift situations, that is, when $p_{te}(x,y)\neq p_{tr}(x,y)$. A
probabilistic source for the dataset shift is a change in the input data
distributions, i.e., when $p_{te}(x)\neq p_{tr}(x)$, which is referred to as
distribution shift Subbaswamy2021Evaluating , also known as data drift
Liu2020Well . As depicted in Fig. 1, covariate shift is a subset of the
generic distribution shift situation when the conditional probability
distribution that represents the input-output rule is the same between the
training and the test data Sakai2019PU :

$\small p_{tr}(y\mid x)=p_{te}(y\mid x),\;p_{tr}(x)\neq p_{te}(x).$ (2)

One of the most common techniques to address the covariate shift problem is to
employ an importance weighting function defined as:
$w(x)=\frac{p_{te}(x)}{p_{tr}(x)}$ which estimates the test-to-training
density ratio Candela2009DatasetS . Subsequently, the risk minimization
problem in Eq.1 is adjusted to the importance-weighted risk:

$\small\min_{\theta\in\Theta}R(f)=\min_{\theta\in\Theta}\frac{1}{N}\sum_{i=1}^{N}w(x_{i})\ell\left(f_{\theta}\left(x_{i}\right),y_{i}\right).$
(3)

Figure 1: Visual representation of the relationship between the types of
distributional change.

There are many popular algorithms to compute the importance weights
$w(x_{i})$, such as Kernel Mean Matching (KMM) Huang2006KMM , Kullback-Leibler
Importance Estimation Procedure (KLIEP) Sugiyama2007KLIEP and least squares
importance fitting (LSIF) Kanamori2009LSIF . It was shown that the importance
weighting procedure can provide consistent learning under covariate shift, and
thus increase the robustness of the performance in changing distributions
Sugiyama2008Direct . However, the main drawback of the procedure is the high
computational cost Chapaneri2019Covariate .

###  2.3 Measuring Robustness to Distribution Shift

Much research is devoted to evaluating ML models’ performance under
distribution shifts. Such an evaluation would be useful for determining the
model’s performance after deployment, where the model might perform
unexpectedly on unseen data points. A study has investigated the relationship
between robustness and complexity of classifiers and concluded that complex
classifiers remain more robust to changes than simple classifiers
Alaiz2008Assessing . Similarly, in Abbasian2010Robustness , the authors have
tested the robustness of common classifiers in distributional shift
situations. The drift was simulated by changing a particular attribute and
assessing the influence on the information gain. The authors have concluded
that ML models that use more attributes, such as K-Nearest-Neighbours (KNN),
in making predictions tend to be more robust than those which rely on fewer
attributes, such as Naive Bayes and Logistic Regression.

Several recent studies have investigated the variability in the model’s
performance across data regions and sub-populations. MANDOLINE framework
Chen2021Mandoline was proposed to estimate the model’s performance under
distribution shift. The framework uses a labeled validation set from the
source distribution and an unlabeled set from the target distribution. Users
can use their prior knowledge to group the data along the possible axes of
distribution shift. Then, the reweighted performance estimates are computed.
Another framework was proposed to proactively evaluate the model’s performance
on the worst-case distribution Subbaswamy2021Evaluating . Users choose two
sets of variables, immutable variables whose distribution should remain
unchanged and mutable variables whose distribution can be changed. The method
identifies the sub-populations with the worst-case risk. Similarly, Sagawa et
al. Sagawa2019Distributionally developed a training procedure that uses prior
knowledge to form groups in training data and minimizes worst-case loss over
these data groups.

In contrast to previous studies, another line of research follows a different
approach by predicting the model’s performance in distributional shift
situations using the regression function. The Average Thresholded Confidence
(ATC) method Garg2022Leveraging was proposed to obtain a threshold on a model
confidence score that enables the prediction of out-of-distribution model’s
accuracy. In another recent study, Guillory et al. Guillory2021Predicting
proposed the so-called difference of confidences (DoC) method that predicts
the model’s performance under distribution shift. DoC is used to directly
estimate the classifier’s accuracy gap between the training and the target
distributions. When lacking true labels for test sets, the authors
Deng2021Labels have derived distribution statistics that can benefit from the
Automatic model Evaluation (AutoEval) problem and estimate the classifier’s
accuracy.

Evaluating the model’s robustness has also been investigated in domain-
specific problems. In image processing, the model’s performance has been
evaluated for many prominent image classification benchmark datasets, such as
CIFAR and ImageNet Recht2019Imagenet ; Taori2020Measuring ; Miller2021Accuracy
, MNIST Yadav2019Cold . The problems are constructed by inducing a wide range
of distribution shifts. In natural language processing (NLP), Miller et al.
Miller2020Effect evaluated the model’s robustness to distribution shift using
the popular Stanford Question Answering Dataset (SQuAD) Rajpurkar2016squad .
The authors noted that training models on more out-of-distribution data did
not lead to improved robustness for ML models. Despite the rich literature
present in the area, the evaluation of the performance of the ML model per
region decomposed by test-to-training density ratio has not been yet
investigated and is provided by this paper.

##  3 Experimental Settings

In this section, the specifications of the experiments performed using
synthetic binary classification problems are illustrated. The experiments are
simulated in a two-dimensional input space and a higher input space of four-
dimensions. The experimental settings were made more diverse by selecting two-
and four-dimensional space settings and omitting the three-dimensional case.
And hence to gain a better insight into the performance of the different ML
models in varied scenarios.

For the experiment design part, the training dataset is considered to be
sampled from a standard Gaussian distribution $X\sim\mathcal{N}_{d}(0,1)$
throughout all experimental setups. Since any normally distributed variable
$X$, with a particular population mean $\mu$ and standard deviation $\sigma$,
can easily be transformed into a standard Gaussian distribution by applying
the equation $z=\frac{X-\mu}{\sigma}$. Therefore, the training input density
function is as follows:

$p_{tr}(x)=\frac{1}{(2\pi)^{d/2}}\exp\left(-\frac{1}{2}X^{T}X\right),$ (4)

where $d$ is the dimension of the input space.

To generate the test data, several affine transformations are applied to the
density of the training data. This method has been widely adopted in the
literature to simulate the covariate shift problem in the dataset
Sugiyama2012IntroductiontoCS ; Sugiyama2007ICV . The data points are
considered to be sampled from a Gaussian distribution
$X\sim\mathcal{N}_{d}(\mu,\Sigma)$ for the test data. Therefore, the test
input density function is given by:

$\small
p_{te}(x)=\frac{1}{(2\pi)^{d/2}\mid\Sigma\mid^{1/2}}\exp\left(-\frac{1}{2}(X-\mu)^{T}\Sigma^{-1}(X-\mu)\right),$
(5)

where $\mu\in\mathbb{R}^{d}$ is the mean and $\Sigma\in\mathcal{S}_{++}^{d}$
is the $d\times d$ symmetric positive-definite covariance matrix whose
$(i,j)$th entry is $Cov[X_{i},X_{j}]$. The statistics $\mu$ and $\Sigma$
represent the parameters of the affine transformations that simulate the drift
in the experiments. Specifically, the mean $\mu$ simulates a drift induced by
translation, and $\Sigma$ simulates a drift induced by scaling through the
variance elements $var(x_{i})=\sigma_{ii}^{2}$, or rotation through the
correlation coefficient $\rho$ in the covariance elements
$cov(x_{i},x_{j})=\sigma_{ij}^{2}=\rho\sigma_{i}\sigma_{j}$. For each drift
type, the experiments are run in a two-dimensional input space and a higher
four-dimensional input space.

Regarding the definition of class posterior probability functions, the
formulations that are commonly used in covariate shift research have been
followed sugiyama2007covariate ; hachiya2012importance . In particular, for
the two-dimensional datasets settings, two different class posterior
probability functions have been defined for classifying the points. The first
function is defined as follows:

$\small\begin{split}F_{1}:p\Big{(}y=+1\mid
X=\left(x_{1},x_{2}\right)\Big{)}=\\\
\frac{1}{2}\left(1+\tanh\left(\min\left(0,x_{1}\right)+4x_{2}\right)\right).\end{split}$
(6)

The second class posterior probability function that was designed is more
complex to learn and is defined as follows:

$\small\begin{split}F_{2}:p\Big{(}y=+1\mid
X=\left(x_{1},x_{2}\right)\Big{)}=\\\
\frac{1}{2}\left(1+\sin\left(\min\left(0,x_{1}\right)+2x_{2}\right)\right).\end{split}$
(7)

Similarly, for the higher-dimensional datasets settings, Two different class
posterior probability functions have been defined as follows:

$\begin{split}F_{3}:p\Big{(}y=+1\mid
X=\left(x_{1},x_{2},x_{3},x_{4}\right)\Big{)}=\\\
\frac{1}{2}\left(1+\tanh\left(\min\left(0,x_{1}\right)-x_{2}+2x_{3}+2x_{4}\right)\right),\end{split}$
(8) $\begin{split}F_{4}:p\Big{(}y=+1\mid
X=\left(x_{1},x_{2},x_{3},x_{4}\right)\Big{)}=\\\
\frac{1}{2}\left(1+\sin\left(\min\left(0,x_{1}\right)+4x_{2}-3x_{3}+2x_{4}\right)\right),\end{split}$
(9)

where $p(y=-1\mid X)=1-p(y=+1\mid X)$ and the optimal decision boundary is the
set of points that satisfy $p(y=-1\mid X)=p(y=+1\mid X)=\frac{1}{2}$. For all
experiments, training data points of size $N_{tr}=20000$ are sampled from the
probability density function (pdf) defined in Eq.4, test data points sampled
from the same distribution of size $N_{ts}=20000$, and another test data
points of size $N_{td}=20000$ sampled from the drifted distribution defined in
Eq.5. Parameter settings and specifications of the two-dimensional experiments
are summarized in Table A in Appendix A, and the four-dimensional experiments
in Table A in Appendix A. A more detailed description of each experiment is
provided in the following subsections.

Figure 2: Training and test data points and the optimal decision boundary of
the experiments

###  3.1 Drift Simulated by Translation

The first set of experiments was created by shifting the mean of the data
$\mu$ and fixing the covariance matrix $\Sigma$. For this type of drift, two
settings were created. One setting is characterized by the one-axis
translation simulating a local concept drift case Almeida2018Adapting , and
the other by the two-axis translation simulating a global concept drift case
Khamassi2018DiscussionAR . The details of the experiments are given as
follows:

  1. a)

One-axis Translation: For the two-dimensional input space, the translation
vector $\begin{bmatrix}3&0\end{bmatrix}^{T}$ is used to shift the original
mean $\begin{bmatrix}0&0\end{bmatrix}^{T}$. Using the aforementioned drift
parameters, two experiments have been created, one experiment whose class
posterior probability function defined in Eq.6, it is referred to as Exp1.1,
and visualized in Fig. 2(a), and the other one using the function defined in
Eq.7, it is referred to as Exp1.2, and visualized in Fig. 2(b).

  2. b)

Two-axis Translation: For the two-dimensional space, the original mean is
shifted by the translation vector $\begin{bmatrix}3&1\end{bmatrix}^{T}$.
Exp1.3 refers to the experiment whose class posterior probability function
defined in Eq.6, and Exp1.4 using the function defined in Eq.7. Exp1.3 and
Exp1.4 are visualized in Fig.2(c) and Fig.2(d), respectively.
Similarly for the four-dimensional data, the original mean is shifted by the
translation vector $\begin{bmatrix}0&-2&-1&1\end{bmatrix}^{T}$. The experiment
whose class posterior probability function is defined in Eq.8 is denoted as
Exp2.1, while Exp2.2 denotes the experiment whose class posterior probability
function is defined in Eq.9.

###  3.2 Drift Simulated by Scaling

On the contrary of the drift explained in the previous section 3.1, the data
have been transformed by scaling the covariance matrix $\Sigma$ and fixing the
mean $\mu$ of the data. In this set of experiments, two settings have been
created, one setting for one-axis scaling simulating a local concept drift
situation and another one for two-axis scaling simulating a global concept
drift situation. To scale the covariance matrix $\Sigma$ using the scalars
$s_{i}>0$ for $i=1,\dots,d$ that represent the scaling factors for each axis
direction, the scaling matrix can be written in matrix form as:

$S_{d}=\left[\begin{array}[]{cccc}s_{1}&0&\cdots&0\\\ 0&s_{2}&\cdots&0\\\
\vdots&\vdots&\ddots&\vdots\\\ 0&0&\cdots&s_{d}\end{array}\right],\quad
s_{i}>0.$ (10)

Therefore, the scaled covariance matrix $\Sigma^{{}^{\prime}}$ can be found by
computing the product $\Sigma^{{}^{\prime}}=SS\Sigma$, the scaled covariance
matrix is cataloged as:

$\begin{split}\Sigma^{{}^{\prime}}=\left[\begin{array}[]{cccc}s_{1}^{2}&0&\cdots&0\\\
0&s_{2}^{2}&\cdots&0\\\ \vdots&\vdots&\ddots&\vdots\\\
0&0&\cdots&s_{d}^{2}\end{array}\right]\left[\begin{array}[]{cccc}\sigma_{1}^{2}&\sigma_{12}^{2}&\cdots&\sigma_{1d}^{2}\\\
\sigma_{21}^{2}&\sigma_{2}^{2}&\cdots&\sigma_{2d}^{2}\\\
\vdots&\vdots&\ddots&\vdots\\\
\sigma_{d1}^{2}&\sigma_{d2}^{2}&\cdots&\sigma_{d}^{2}\end{array}\right]\\\
=\left[\begin{array}[]{cccc}(s_{1}\sigma_{1})^{2}&(s_{1}\sigma_{12})^{2}&\cdots&(s_{1}\sigma_{1d})^{2}\\\
(s_{2}\sigma_{21})^{2}&(s_{2}\sigma_{2})^{2}&\cdots&(s_{2}\sigma_{2d})^{2}\\\
\vdots&\vdots&\ddots&\vdots\\\
(s_{d}\sigma_{d1})^{2}&(s_{d}\sigma_{d2})^{2}&\cdots&(s_{d}\sigma_{d})^{2}\end{array}\right],\end{split}$
(11)

where $s_{i}$ is the scaling factor of dimension $i$ and $\sigma_{ij}$ is the
covariance between dimensions $i$ and $j$. The details of the experiments are
given as follows:

  1. a)

One-axis Scaling: For the two-dimensional input space, the scaling matrix
$S=\left[\begin{array}[]{cc}2&0\\\ 0&1\end{array}\right]$ is used to transform
the original covariance matrix $\Sigma=\left[\begin{array}[]{cc}1&0\\\
0&1\end{array}\right]$. Applying Eq.11, the scaled covariance matrix is
$\Sigma^{{}^{\prime}}=\left[\begin{array}[]{cc}4&0\\\ 0&1\end{array}\right]$.
Using the scaled covariance matrix $\Sigma^{{}^{\prime}}$, two experiments
have been created: Exp1.5, visualized in Fig.2(e), and Exp1.6, visualized in
Fig.2(f), whose class posterior probability function defined in Eq.6 and Eq.7,
respectively.

  2. b)

Two-axis Scaling: For the two-dimensional space, the original covariance
matrix is transformed by the scaling matrix
$S=\left[\begin{array}[]{cc}\sqrt{3}&0\\\ 0&\sqrt{2}\end{array}\right]$,
resulting in a scaled covariance matrix
$\Sigma^{{}^{\prime}}=\left[\begin{array}[]{cc}3&0\\\ 0&2\end{array}\right]$.
Exp1.7, visualized in Fig.2(g), and Exp1.8, visualized in Fig.2(h), refer to
the experiments whose class posterior probability function defined in Eq.6 and
Eq.7, respectively.
Similarly for the four-dimensional data, the original covariance matrix is
transformed by the scaling matrix:
$S=\left[\begin{array}[]{cccc}\sqrt{3}&0&0&0\\\ 0&\sqrt{2}&0&0\\\
0&0&\sqrt{2}&0\\\ 0&0&0&\sqrt{3}\end{array}\right]$.
By applying Eq.10, the scaled covariance matrix is found:
$\Sigma^{{}^{\prime}}=\left[\begin{array}[]{cccc}3&0&0&0\\\ 0&2&0&0\\\
0&0&2&0\\\ 0&0&0&3\end{array}\right]$.
Exp2.3 and Exp2.4 denote the experiments whose class posterior probability
function defined in Eq.8 and Eq.9, respectively.

###  3.3 Drift Simulated by Translation and Scaling

In this set of experiments, a combination of linear transformations of the
data points is used by translating and scaling the dataset to simulate the
drift. For two-dimensional data, translation is formed using the translation
vector $\begin{bmatrix}3&1\end{bmatrix}^{T}$, while scaling is formed using
the scaling matrix $S=\left[\begin{array}[]{cc}\sqrt{3}&0\\\
0&\sqrt{2}\end{array}\right]$, resulting in a scaled covariance matrix
$\Sigma^{{}^{\prime}}=\left[\begin{array}[]{cc}3&0\\\ 0&2\end{array}\right]$.
Exp1.9, visualized in Fig.2(i), and Exp1.10, visualized in Fig.2(j), refer to
the experiments whose class posterior probability function defined in Eq.6 and
Eq.7, respectively.

###  3.4 Drift Simulated by Translation, Scaling and Rotation

In this set of experiments, the drift is simulated by applying three different
affine transformations to the dataset by translating, scaling, and rotating
the data points. The covariance matrix after scaling and rotating can be
calculated by means of the following matrix multiplication:

$\Sigma^{{}^{\prime\prime}}=R\Sigma^{{}^{\prime}}R^{T},\quad\Sigma^{{}^{\prime}}=SS\Sigma,$
(12)

where $R$ is the rotation matrix. Note that the order of the transformation
methods affects the end results. In these experiments, the assumption is made
that the data is being scaled and rotated.

For the rotation of the data points, a rotation matrix $R$ is defined to
rotate the data points through a desired angle $\theta$ about their origin in
space. In a two-dimensional space, the general definition of the rotation
matrix $R$ is given by the following equation:

$R(\theta)=\left[\begin{array}[]{cc}\cos\theta&-\sin\theta\\\
\sin\theta&\cos\theta\end{array}\right].$ (13)

For the four-dimensional space, a basic rotation matrix $R$ is given by the
following equation:

$R(\theta)=\left[\begin{array}[]{cccc}\cos\theta&-\sin\theta&0&0\\\
\sin\theta&\cos\theta&0&0\\\ 0&0&1&0\\\ 0&0&0&1\end{array}\right],$ (14)

where $\theta$ is the rotation angle.

In our experimental settings, for the two-dimensional case, a translation
vector $\begin{bmatrix}4&-1\end{bmatrix}^{T}$ is used to shift the original
mean $\mu$. For scaling and rotation, the scaling matrix
$S=\left[\begin{array}[]{cc}2&0\\\ 0&\sqrt{3}\end{array}\right]$ is used to
scale and rotate the data by $45^{\circ}$. This parameter setting would result
in the following scaled and rotated covariance matrix by applying Eq.12 and
the rotation matrix defined in Eq.13:
$\Sigma^{{}^{\prime\prime}}=\left[\begin{array}[]{cc}3.5&0.5\\\
0.5&3.5\end{array}\right]$.
Exp1.11, visualized in Fig.2(k), and Exp1.12, visualized in Fig.2(l), refer to
the experiments whose class posterior probability function defined in Eq.6 and
Eq.7, respectively.

For four-dimensional data, the original mean $\mu$ is shifted through the
translation vector $\begin{bmatrix}0&-2&-1&1\end{bmatrix}^{T}$ and scale the
data points through the scaling matrix
$S=\left[\begin{array}[]{cccc}\sqrt{3}&0&0&0\\\ 0&\sqrt{2}&0&0\\\
0&0&\sqrt{2}&0\\\ 0&0&0&\sqrt{3}\end{array}\right]$, and then rotate the
scaled data points by $45^{\circ}$. This parameter setting would result in the
following scaled and rotated covariance matrix by applying Eq.12 and the
rotation matrix defined in Eq.14:

$\Sigma^{{}^{\prime\prime}}=\left[\begin{array}[]{cccc}2.5&0.5&0&0\\\
0.5&2.5&0&0\\\ 0&0&2&0\\\ 0&0&0&3\end{array}\right]$. Exp2.5 and Exp2.6 denote
the experiments whose class posterior probability function is defined in Eq.8
and Eq.9, respectively.

##  4 Evaluation Methodology

In this section, the methodology to address the research questions and
quantify the robustness of ML models’ performance to covariate shift
situations is explained. The ML models used for evaluation are first iterated,
followed by a description of the evaluation metrics used to assess
performance. Lastly, the decomposition of the pdfs by the density ratio
regions is described.

###  4.1 ML Models

In this paper, the performance of several popular conventional ML algorithms
is compared under covariate shift to address RQ1 and RQ2. To draw conclusions
and gain better insight into the robustness to distributional shifts, the
chosen ML algorithms have been diversified by selecting classification
algorithms from different families.

The selected ML algorithms for our evaluation are the following:

  * •

Support Vector Machines (SVM): SVM Cortes1995SVM is one of the most popular ML
classification algorithms. SVM classifies the points by finding the optimal
separating hyperplane between the classes.

  * •

Logistic regression (LR): LR models are used to predict the likelihood of the
target class and are usually solved by maximum likelihood methods
Hastie2009Elements . For binary classification, the logistic regression model
predicts the probability as follows:

$p(y=\pm
1\mid\mathbf{x},\mathbf{w})=\frac{1}{1+\exp\left(-y\mathbf{w}^{\mathrm{T}}\mathbf{x}\right)}.$
(15)

  * •

Random forests (RF): Random forests are an ensemble of decision tree models
and an extension of the bagging method Breiman2001RF . It creates a collection
of de-correlated decision trees and then aggregates the predictions of each
individual tree.

  * •

Gaussian Naive Bayes (GNB): GNB is a simple probabilistic classification
algorithm that implements Bayes’ Theorem Bishop2006Pattern . It involves
calculating the posterior probability by applying the Bayes rule:

$\small p(y=\pm 1\mid\mathbf{x})=p(y=\pm 1)\frac{\prod_{i=1}^{d}p(x_{i}\mid
y=\pm 1)}{p(\mathbf{x})}.$ (16)

GNB algorithm assumes that the class-conditional probability distribution,
i.e. $p(\mathbf{x}\mid y=\pm 1)$, follows the Gaussian distribution and
estimates the mean and standard deviation parameters from the training data.

  * •

K-Nearest-Neighbours (KNN): KNN is a popular algorithm that uses the
neighborhood of the data point to make predictions Hand2007Principles . A
voting mechanism is used to determine the class of the new data point. The
votes are retrieved from the k data points that are the closest to the new
data point.

###  4.2 Evaluation Metrics

Observing the loss rate in the performance of ML models is a commonly adopted
approach to measure the robustness of the learning algorithms to
distributional changes Ovadia2019Uncertainty ; Amodei2016Concrete . The
performance is usually measured on two data samples, the training samples and
out-of-distribution samples. This paper evaluates the robustness of the ML
models used in the experiments using the degradation rate of different
performance metrics, including accuracy, F-score, and Matthews coefficient of
correlation (MCC). The percentage of data points that are correctly classified
represents the accuracy of the model. With TP representing the count of true
positives, TN represents the count of true negatives, FP represents the count
of false positives, and FN the count of false negatives, the accuracy can be
expressed as:

$\operatorname{Accuracy}=\frac{TP+TN}{TP+TN+FP+FN}.$ (17)

On the other hand, the F-score, also called the F1 score, is the harmonic mean
between the precision and recall metrics Lesch2005metric . Recall measures the
ratio of positive data points that are correctly classified, whereas precision
measures the ratio of data points that are classified as positive that are
truly positive:

$\operatorname{F-score}=2\cdot\frac{\text{Precision}\cdot\text{Recall}}{\text{Precision}+\text{Recall}},$
(18)

where

$\operatorname{Recall}=\frac{TP}{TP+FN},$ (19)

$\operatorname{Precision}=\frac{TP}{TP+FP}.$ (20)

Similarly, MCC uses the confusion matrix to score the quality of the
classification in the interval [-1, +1], with -1 denoting perfect
misclassification and +1 denoting perfect classification, where 0 means
prediction more of a random prediction:

$\footnotesize\operatorname{MCC}=\frac{TP\cdot TN-FP\cdot
FN}{\sqrt{(TP+FP)\cdot(TP+FN)\cdot(TN+FP)\cdot(TN+FN)}}.$ (21)

###  4.3 PDF Domain Region Decomposition

To address RQ3 and evaluate the performance on subpopulations of the dataset
according to the density ratio between the test and training datasets, the
input space domain of the test dataset is decomposed into two regions. The
first region, denoted R1, is the region with a high density of the training
dataset; i.e. where the density ratio is $r=\frac{p_{te}(x)}{p_{tr}(x)}\leq
1$. The other region denoted R2, is the region with high density of the test
dataset, that is, where the density ratio $r=\frac{p_{te}(x)}{p_{tr}(x)}>1$.
To decompose the pdfs by density regions, the following equation must be
solved:

${p_{te}(x)}={p_{tr}(x)}.$ (22)

Since the distribution is multivariate in our experiments, the pdfs are
hypersurfaces of dimension $d$ embedded in $(d+1)$-dim space, and they
intersect in a set of $d$-dim points that lie on a hypersurface
$\mathfrak{H}$, also embedded in ($d+1$)-dim space; where $d$ is the dimension
of the data points. The solution of Eq.22 would provide the hypersurface
$\mathfrak{H}$ equation.

Solving Eq.22 for the $d$-dimensional case of our experiments;
$X\sim\mathcal{N}_{d}(\mu,\Sigma)$:

$\begin{split}\frac{1}{(2\pi)^{d/2}\mid\Sigma\mid^{1/2}}\exp\left(-\frac{1}{2}(X-\mu)^{T}\Sigma^{-1}(X-\mu)\right)\\\
=\frac{1}{(2\pi)^{d/2}}\exp\left(-\frac{1}{2}X^{T}X\right),\end{split}$ (23)

results in the hypersurface $\mathfrak{H}$ defined by the following equation:

$\mathfrak{H}(X):(X-\mu)^{T}\Sigma^{-1}(X-\mu)+\log(\mid\Sigma\mid)-X^{T}X=0.$
(24)

The data points that lie in the region R1 are those points which satisfy the
inequality:

$(X-\mu)^{T}\Sigma^{-1}(X-\mu)+\log(\mid\Sigma\mid)-X^{T}X\leq 0,$ (25)

otherwise, the points lie in the region R2.

Specifically, solving Eq.22 for the two-dimensional datasets of our
experiments; i.e. where the test input density is
$\left(\begin{array}[]{l}x\\\ y\end{array}\right)\sim
N\left[\left(\begin{array}[]{l}\mu_{1}\\\
\mu_{2}\end{array}\right),\left(\begin{array}[]{cc}\sigma_{1}^{2}&\rho\sigma_{1}\sigma_{2}\\\
\rho\sigma_{1}\sigma_{2}&\sigma_{2}^{2}\end{array}\right)\right]$:

$\begin{split}\frac{1}{2\pi\left(1-\rho^{2}\right)^{1/2}\sigma_{1}\sigma_{2}}\exp\left\\{-\frac{1}{2\left(1-\rho^{2}\right)}\left[\left(\frac{x-\mu_{1}}{\sigma_{1}}\right)^{2}\right.\right.\\\
\left.\left.-2\rho\left(\frac{x-\mu_{1}}{\sigma_{1}}\right)\left(\frac{y-\mu_{2}}{\sigma_{2}}\right)+\left(\frac{y-\mu_{2}}{\sigma_{2}}\right)^{2}\right]\right\\}\\\
=\frac{1}{2\pi}\exp\left[-\frac{1}{2}\left(x^{2}+y^{2}\right)\right],\end{split}$
(26)

results in a 2D curve that lies on a surface $\mathbf{S}$. We obtain the
following equation defining the surface $\mathbf{S}$ in the 3D space:

$\begin{split}\mathbf{S}(x,y):\left[\frac{-1}{2}+\frac{b}{\sigma_{1}^{2}}\right]x^{2}+\left[\frac{-1}{2}+\frac{b}{\sigma_{2}^{2}}\right]y^{2}-\\\
\left[\frac{2b\mu_{1}}{\sigma_{1}^{2}}-\frac{2b\rho\mu_{2}}{\sigma_{1}\sigma_{2}}\right]x-\left[\frac{2b\mu_{2}}{\sigma_{2}^{2}}-\frac{2b\rho\mu_{1}}{\sigma_{1}\sigma_{2}}\right]y-\\\
\frac{2b\rho}{\sigma_{1}\sigma_{2}}xy=r,\end{split}$ (27)

where:

$r=c+\frac{2b\rho}{\sigma_{1}\sigma_{2}}\mu_{1}\mu_{2},$ (28)
$c=a-\frac{b\mu_{1}^{2}}{\sigma_{1}^{2}}-\frac{b\mu_{2}^{2}}{\sigma_{2}^{2}},$
(29) $b=\frac{1}{2\left(1-\rho^{2}\right)},$ (30)
$a=\log\frac{1}{\sigma_{1}\sigma_{2}\sqrt{1-\rho^{2}}}.$ (31)

The data points that lie in the region R1 are those points which satisfy the
inequality:

$\begin{split}\left[\frac{-1}{2}+\frac{b}{\sigma_{1}^{2}}\right]x^{2}+\left[\frac{-1}{2}+\frac{b}{\sigma_{2}^{2}}\right]y^{2}-\left[\frac{2b\mu_{1}}{\sigma_{1}^{2}}-\frac{2b\rho\mu_{2}}{\sigma_{1}\sigma_{2}}\right]\\\
x-\left[\frac{2b\mu_{2}}{\sigma_{2}^{2}}-\frac{2b\rho\mu_{1}}{\sigma_{1}\sigma_{2}}\right]y-\frac{2b\rho}{\sigma_{1}\sigma_{2}}xy\geq
r,\end{split}$ (32)

otherwise, the points lie in the region R2.

The surface $\mathbf{S}$ has a particular shape based on the type of drift
simulated in the pdf of the dataset. Specifically, in the case of drifts
simulated by two-axis translation, the surface $\mathbf{S}$ is a vertical
plane in the 3D space defined by the following equation:

$2\mu_{1}x-\mu_{1}^{2}+2\mu_{2}y-\mu_{2}^{2}=0.$ (33)

For a translation on one axis, the surface $\mathbf{S}$ is a vertical plane
that is parallel to the xz-plane or the yz-plane. In particular, if the
translation is along the x-axis, the surface $\mathbf{S}$ is a vertical plane
parallel to the yz-plane and is given by the equation:

$x=\frac{\mu_{1}}{2}.$ (34)

On the contrary, if the translation is along the y-axis, the surface
$\mathbf{S}$ is a vertical plane parallel to the xz-plane and is given by the
equation:

$y=\frac{\mu_{2}}{2}.$ (35)

In the case of two-axis scaling; $\sigma_{1}>1$ and $\sigma_{2}>1$; the
surface $\mathbf{S}$ is an elliptic cylinder defined by the equation:

$\frac{x^{2}}{\alpha^{2}}+\frac{y^{2}}{\beta^{2}}=1,$ (36)

where:

$\alpha^{2}=\frac{2\sigma_{1}^{2}\log(\sigma_{1}\sigma_{2})}{\sigma_{1}^{2}-1},$
(37)

and:

$\beta^{2}=\frac{2\sigma_{2}^{2}\log(\sigma_{1}\sigma_{2})}{\sigma_{2}^{2}-1}.$
(38)

In the special case of scaling at the same magnitude in both dimensions; i.e.,
$\sigma_{1}=\sigma_{2}\implies\alpha=\beta$; the surface $\mathbf{S}$ is a
right-circular cylinder.

In the case of a one-axis scaling, the two pdfs intersect in curves that lie
on two parallel planes. If $\sigma_{1}=1$; these parallel planes are defined
by the following equation:

$y^{2}=\frac{2\sigma_{2}^{2}\log\sigma_{2}}{\sigma_{2}^{2}-1}.$ (39)

Whereas if $\sigma_{2}=1$; the parallel planes are defined by the following
equation:

$x^{2}=\frac{2\sigma_{1}^{2}\log\sigma_{1}}{\sigma_{1}^{2}-1}.$ (40)

Similarly, in the case of translation and scaling at the same time, the
surface where the two pdfs intersect is a cylinder that is centered at
$\left(\frac{\mu_{1}}{1-\sigma_{1}^{2}},\frac{\mu_{2}}{1-\sigma_{2}^{2}}\right)$.
Fig. 3 shows the densities of the training and test data along with the
corresponding intersection surface between the two pdfs of the two-dimensional
experiments.

(a)

(b)

(c)

(d)

(e)

(f)

Figure 3: Training and test input densities decomposed by the R1 and R2
regions and the intersection surface.

##  5 Empirical Results and Analysis

The results of the experiments detailed in Section 3 will be scrutinized in
this section to answer the research questions. Specifically, the overall
results of applying the ML models to different datasets characterized by
various types of drift will be presented. Additionally, a model-wise
performance analysis will follow. To execute the experiments, the scikit-learn
library111https://scikit-learn.org/was utilized, a widely used open-source
Python ML package that provides the implementation of several classification
algorithms.

###  5.1 Degradation Rate in Evaluation Metrics

Changes in data distribution usually lead to a degradation of performance
metrics Rabanser2019Failing . To measure the performance loss after the drift
and address RQ1, the degradation rate is calculated, this rate represents the
percentage of the performance drop of the ML model on the drifted dataset.
Table 1 recapitulates the results of the two-dimensional experiments across
the different performance metrics of the ML models.

The first observation from the results is that the Random Forests algorithm
demonstrated a high robustness level in most experiments across all
performance metrics. This is an advantage of ensemble-based methods that can
alleviate the biases of the datasets by combining individual classifiers’
votes Clark2019Ensemble . However, this is not the case in the four-
dimensional experiment results summarized in Table 2. RF has shown much poorer
robustness in higher-dimensional data. This could be attributable to the fact
that learners which use more covariates to make predictions tend to show
greater robustness than those that rely on a subset of covariates
Abbasian2010Robustness . The default value provided by the scikit-learn
library was used to select the parameter that controls the subset of
covariates used to find the best tree split in the Random Forests algorithm.
The library assigns the square root value of the total covariates to the
parameter. Furthermore, LR showed the highest degradation rate in most of the
two-dimensional experiments, which is a recognized drawback of the algorithm
in the case of out-of-sample predictions, where the maximum likelihood
estimator tends to display poor performance due to the overfitting effect
Shafieezadeh2015RobustLR .

Table 1: Two-dimensional robustness evaluation results Experiment |  ML model | Same distribution | Drifted distribution | Degradation rate
---|---|---|---|---
Acc | F1 | MCC | Acc | F1 | MCC | Acc | F1 | MCC
Exp1.1 | SVM | 0.998 | 0.9978 | 0.9959 | 0.9846 | 0.9847 | 0.9695 | 1.34 % | 1.31 % | 2.65 %
LR | 0.9768 | 0.975 | 0.9535 | 0.8916 | 0.9014 | 0.8022 | 8.72 % | 7.55 % | 15.87 %
RF | 0.9998 | 0.9998 | 0.9997 | 0.9987 | 0.9986 | 0.9974 | 0.11 %* | 0.12 %* | 0.23 %*
GNB | 0.971 | 0.9686 | 0.9417 | 0.9523 | 0.9495 | 0.9087 | 1.93 % | 1.97 % | 3.50 %
KNN | 0.9978 | 0.9977 | 0.9957 | 0.9634 | 0.9638 | 0.9274 | 3.45 % | 3.40 % | 6.86 %
Exp1.2 | SVM | 0.9976 | 0.9973 | 0.9951 | 0.9612 | 0.9765 | 0.8742 | 3.65 % | 2.09 % | 12.15 %
LR | 0.9786 | 0.9768 | 0.9569 | 0.9457 | 0.9688 | 0.7825 | 3.36 % | 0.82 % | 18.23 %
RF | 1.0 | 1.0 | 1.0 | 0.9988 | 0.9988 | 0.9977 | 0.12 %* | 0.12 %* | 0.23 %*
GNB | 0.9711 | 0.9687 | 0.9419 | 0.9663 | 0.9796 | 0.8886 | 0.49 % | 1.13 % | 5.66 %
KNN | 0.9973 | 0.9971 | 0.9946 | 0.9823 | 0.9896 | 0.9318 | 1.50 % | 0.75 % | 6.31 %
Exp1.3 | SVM | 0.997 | 0.9967 | 0.9939 | 0.986 | 0.9832 | 0.9712 | 1.10 % | 1.35 % | 2.28 %
LR | 0.9768 | 0.9747 | 0.9533 | 0.955 | 0.9487 | 0.9107 | 2.23 % | 2.67 % | 4.47 %
RF | 0.9983 | 0.9981 | 0.9966 | 0.9931 | 0.9919 | 0.986 | 0.52 %* | 0.62 %* | 1.06 %*
GNB | 0.9655 | 0.9622 | 0.9305 | 0.9502 | 0.9415 | 0.8982 | 1.58 % | 2.15 % | 3.47 %
KNN | 0.9962 | 0.9958 | 0.9922 | 0.9896 | 0.9878 | 0.9788 | 0.66 % | 0.80 % | 1.35 %
Exp1.4 | SVM | 0.9966 | 0.9963 | 0.9932 | 0.9936 | 0.993 | 0.9872 | 0.30 % | 0.33 % | 0.60 %
LR | 0.9766 | 0.9747 | 0.953 | 0.9699 | 0.9675 | 0.9402 | 0.69 % | 0.74 % | 1.34 %
RF | 0.9983 | 0.9982 | 0.9966 | 0.997 | 0.9968 | 0.9941 | 0.13 % | 0.14 %* | 0.25 %*
GNB | 0.97 | 0.9674 | 0.9397 | 0.9689 | 0.9657 | 0.9373 | 0.11 %* | 0.18 % | 0.26 %
KNN | 0.9965 | 0.9962 | 0.993 | 0.9922 | 0.9914 | 0.9844 | 0.43 % | 0.48 % | 0.87 %
Exp1.5 | SVM | 0.9982 | 0.998 | 0.9964 | 0.872 | 0.9077 | 0.7375 | 12.64 % | 9.05 % | 25.98 %
LR | 0.9776 | 0.9756 | 0.9548 | 0.944 | 0.9643 | 0.8463 | 3.44 % | 1.16 % | 11.36 %
RF | 0.9998 | 0.9999 | 0.9996 | 0.9988 | 0.9988 | 0.9977 | 0.10 %* | 0.11 %* | 0.19 %*
GNB | 0.9684 | 0.9656 | 0.9365 | 0.9539 | 0.9686 | 0.888 | 1.50 % | 0.31 % | 5.18 %
KNN | 0.9969 | 0.9966 | 0.9938 | 0.9906 | 0.9938 | 0.9744 | 0.63 % | 0.28 % | 1.95 %
Exp1.6 | SVM | 0.9978 | 0.9976 | 0.9956 | 0.8842 | 0.7538 | 0.7177 | 11.39 % | 24.44 % | 27.91 %
LR | 0.9752 | 0.9729 | 0.9501 | 0.9232 | 0.8834 | 0.8398 | 5.33 % | 9.20 % | 11.61 %
RF | 1.0 | 0.9999 | 0.9999 | 0.9984 | 0.9982 | 0.9967 | 0.16 %* | 0.17 %* | 0.32 %*
GNB | 0.9696 | 0.9667 | 0.9389 | 0.9532 | 0.9127 | 0.8874 | 1.69 % | 5.59 % | 5.49 %
KNN | 0.9958 | 0.9954 | 0.9914 | 0.9868 | 0.9773 | 0.9681 | 0.90 % | 1.82 % | 2.35 %
Exp1.7 | SVM | 0.9907 | 0.9902 | 0.9814 | 0.9478 | 0.9481 | 0.8956 | 4.33 % | 4.25 % | 8.74 %
LR | 0.8198 | 0.8036 | 0.6391 | 0.7532 | 0.7816 | 0.5241 | 8.12 % | 2.74 % | 17.99 %
RF | 0.9998 | 0.9998 | 0.9996 | 0.9956 | 0.9954 | 0.9913 | 0.42 %* | 0.44 %* | 0.84 %*
GNB | 0.7645 | 0.7137 | 0.5408 | 0.7558 | 0.7197 | 0.5301 | 1.14 % | 0.84 % | 1.98 %
KNN | 0.9906 | 0.9901 | 0.9812 | 0.9242 | 0.9254 | 0.8487 | 6.70 % | 6.53 % | 13.50 %
Exp1.8 | SVM | 0.9903 | 0.9899 | 0.9806 | 0.9325 | 0.94 | 0.8636 | 5.84 % | 5.04 % | 11.93 %
LR | 0.8231 | 0.8046 | 0.6474 | 0.6383 | 0.7581 | 0.2909 | 22.45 % | 5.78 % | 55.07 %
RF | 0.9952 | 0.995 | 0.9905 | 0.9868 | 0.9884 | 0.9735 | 0.84 %* | 0.66 %* | 1.72 %*
GNB | 0.769 | 0.7192 | 0.5524 | 0.7049 | 0.7885 | 0.418 | 8.34 % | 9.64 % | 24.33 %
KNN | 0.9918 | 0.9914 | 0.9835 | 0.8882 | 0.9072 | 0.7734 | 10.45 % | 8.49 % | 21.36 %
Exp1.9 | SVM | 0.99 | 0.9894 | 0.9798 | 0.9698 | 0.9683 | 0.9394 | 2.04 % | 2.13 % | 4.12 %
LR | 0.8188 | 0.7997 | 0.6375 | 0.7405 | 0.714 | 0.4803 | 9.56 % | 10.72 % | 24.66 %
RF | 0.9942 | 0.9939 | 0.9884 | 0.9805 | 0.9796 | 0.961 | 1.38 %* | 1.44 %* | 2.77 %*
GNB | 0.7664 | 0.7138 | 0.5449 | 0.7264 | 0.66 | 0.4683 | 5.22 % | 7.54 % | 14.06 %
KNN | 0.9916 | 0.9912 | 0.9833 | 0.9625 | 0.9607 | 0.9249 | 2.93 % | 3.08 % | 5.94 %
Exp1.10 | SVM | 0.9906 | 0.99 | 0.9811 | 0.9674 | 0.9671 | 0.935 | 2.34 % | 2.31 % | 4.70 %
LR | 0.8198 | 0.7985 | 0.6392 | 0.6716 | 0.6548 | 0.3445 | 18.08 % | 18.00 % | 46.10 %
RF | 0.9954 | 0.9952 | 0.9909 | 0.9792 | 0.9791 | 0.9584 | 1.63 %* | 1.62 %* | 3.28 %*
GNB | 0.7677 | 0.7119 | 0.547 | 0.6486 | 0.6106 | 0.3023 | 15.51 % | 14.23 % | 44.73 %
KNN | 0.9918 | 0.9912 | 0.9834 | 0.9618 | 0.9618 | 0.9236 | 3.02 % | 2.97 % | 6.08 %
Exp1.11 | SVM | 0.9902 | 0.9898 | 0.9805 | 0.849 | 0.8452 | 0.7006 | 14.26 % | 14.61 % | 28.55 %
LR | 0.822 | 0.8062 | 0.6434 | 0.6114 | 0.7094 | 0.2809 | 25.62 % | 12.01 % | 56.34 %
RF | 0.9952 | 0.995 | 0.9905 | 0.993 | 0.9931 | 0.986 | 0.22 %* | 0.19 %* | 0.45 %*
GNB | 0.7721 | 0.7315 | 0.5559 | 0.6644 | 0.7242 | 0.366 | 13.95 % | 1.01 % | 34.16 %
KNN | 0.9916 | 0.9912 | 0.9832 | 0.8474 | 0.853 | 0.6951 | 14.54 % | 13.94 % | 29.30 %
Exp1.12 | SVM | 0.9909 | 0.9904 | 0.9817 | 0.7302 | 0.6574 | 0.5161 | 26.31 % | 33.62 % | 47.43 %
LR | 0.8208 | 0.7998 | 0.6421 | 0.5327 | 0.4914 | 0.0681 | 35.10 % | 38.56 % | 89.39 %
RF | 0.9958 | 0.9955 | 0.9915 | 0.9752 | 0.9748 | 0.9512 | 2.07 %* | 2.08 %* | 4.06 %*
GNB | 0.7709 | 0.7183 | 0.5548 | 0.4958 | 0.3764 | 0.0051 | 35.69 % | 47.60 % | 100.92 %
KNN | 0.9916 | 0.9912 | 0.9833 | 0.728 | 0.7185 | 0.458 | 26.58 % | 27.51 % | 53.42 %
Table 2: Four-dimensional robustness evaluation results Experiment |  ML model | Same distribution | Drifted distribution | Degradation rate
---|---|---|---|---
Acc | F1 | MCC | Acc | F1 | MCC | Acc | F1 | MCC
Exp2.1 | SVM | 0.993 | 0.9923 | 0.9859 | 0.9739 | 0.9812 | 0.9385 | 1.92 % | 1.12 % | 4.81 %
LR | 0.9691 | 0.9714 | 0.9795 | 0.9662 | 0.9377 | 0.9327 | 0.24 %* | 1.38 % | 0.53 %*
RF | 0.9768 | 0.9746 | 0.9533 | 0.9337 | 0.9517 | 0.8471 | 4.41 % | 2.35 % | 11.14 %
GNB | 0.9641 | 0.9599 | 0.9281 | 0.92 | 0.9391 | 0.8368 | 4.57 % | 2.17 % | 9.84 %
KNN | 0.974 | 0.9716 | 0.9477 | 0.9592 | 0.9706 | 0.9038 | 1.52 % | 0.10 %* | 4.63 %
Exp2.2 | SVM | 0.7518 | 0.7449 | 0.5038 | 0.6056 | 0.6132 | 0.2113 | 19.45 % | 17.68 % | 58.06 %
LR | 0.5002 | 0.6346 | 0.0053 | 0.4982 | 0.4689 | 0.0004 | 0.40 %* | 35.34 % | 92.45 %
RF | 0.9166 | 0.9158 | 0.8333 | 0.7844 | 0.7811 | 0.5692 | 14.42 % | 14.71 % | 31.69 %*
GNB | 0.501 | 0.5155 | 0.0091 | 0.4952 | 0.5124 | 0.002 | 1.17 % | 0.60 %* | 78.02 %
KNN | 0.904 | 0.9029 | 0.808 | 0.7756 | 0.77 | 0.5518 | 14.20 % | 14.72 % | 31.71 %
Exp2.3 | SVM | 0.9938 | 0.993 | 0.9874 | 0.9818 | 0.9793 | 0.9632 | 1.21 % | 1.38 % | 2.45 %
LR | 0.9704 | 0.9668 | 0.9401 | 0.9627 | 0.9591 | 0.926 | 0.79 % | 0.80 % | 1.50 %
RF | 0.9796 | 0.9772 | 0.9587 | 0.9652 | 0.961 | 0.9296 | 1.47 % | 1.66 % | 3.04 %
GNB | 0.9708 | 0.9666 | 0.9411 | 0.9674 | 0.9626 | 0.9341 | 0.35 %* | 0.41 %* | 0.74 %*
KNN | 0.9768 | 0.974 | 0.953 | 0.969 | 0.9653 | 0.9374 | 0.80 % | 0.89 % | 1.64 %
Exp2.4 | SVM | 0.7512 | 0.7468 | 0.5026 | 0.5994 | 0.5875 | 0.1987 | 20.21 % | 21.33 % | 60.47 %
LR | 0.5011 | 0.4817 | 0.0038 | 0.4983 | 0.4734 | 0.0017 | 0.56 % | 1.75 %* | 55.26 %
RF | 0.9216 | 0.9211 | 0.8433 | 0.7838 | 0.7821 | 0.5676 | 14.95 % | 15.09 % | 32.69 %
GNB | 0.5042 | 0.5182 | 0.0088 | 0.5017 | 0.4014 | 0.0013 | 0.50 %* | 22.54 % | 85.23 %
KNN | 0.9008 | 0.9001 | 0.8015 | 0.7741 | 0.7731 | 0.5482 | 14.07 % | 14.11 % | 31.60 %*
Exp2.5 | SVM | 0.9935 | 0.9927 | 0.9869 | 0.9174 | 0.9285 | 0.8411 | 7.66 % | 6.47 % | 14.77 %
LR | 0.9698 | 0.9737 | 0.9389 | 0.9673 | 0.9661 | 0.9312 | 0.26 %* | 0.79 % | 0.82 %*
RF | 0.976 | 0.9731 | 0.9514 | 0.9301 | 0.9413 | 0.8575 | 4.70 % | 3.27 % | 9.87 %
GNB | 0.9686 | 0.9642 | 0.9369 | 0.9445 | 0.9527 | 0.8914 | 2.49 % | 1.19 % | 4.86 %
KNN | 0.974 | 0.9709 | 0.9473 | 0.959 | 0.9669 | 0.9133 | 1.54 % | 0.41 %* | 3.59 %
Exp2.6 | SVM | 0.758 | 0.7558 | 0.5161 | 0.5383 | 0.5558 | 0.077 | 28.98 % | 26.46 % | 85.08 %
LR | 0.5025 | 0.5234 | 0.0048 | 0.498 | 0.2368 | 0.0037 | 0.90 % | 54.76 % | 22.92 %*
RF | 0.92 | 0.92 | 0.8401 | 0.6544 | 0.6663 | 0.3099 | 28.87 % | 27.58 % | 63.11 %
GNB | 0.5012 | 0.51 | 0.006 | 0.497 | 0.4913 | 0.0026 | 0.85 %* | 3.81 %* | 56.67 %
KNN | 0.9014 | 0.9015 | 0.8029 | 0.6662 | 0.6837 | 0.3348 | 26.09 % | 24.16 % | 58.30 %

For the rest of the models, there are no precise general conclusions that can
be deduced, since each model’s degradation rates were affected by the settings
of the experiments. It can be seen from Table 1 that SVM is the model with the
second lowest degradation rate after RF in most cases where multiple drifts
were simulated, that is, in experiments Exp1.9 to Exp1.12. On the other hand,
GNB and KNN are highly affected by multiple drifts since $p(x)$ has been
altered to a great extent. Each model’s performance will be further
investigated in the following subsection.

In terms of the effects of the complexity of the decision surface, it can be
seen that the performance on the test data is worse and the degradation rates
are higher in the four-dimensional experiments than in the two-dimensional
cases when using the more complex decision function $F_{2}$, except for the LR
and GNB algorithms, as they display low degradation rates due to poor
performance on the original dataset. This can be associated with the positive
correlation between the complexity of the decision boundary and the
dimensional space of the problem Atashpaz2013complexity . Furthermore, the
effect of the complexity of the decision boundary is more discernible in
experiments with mixed drifts, i.e., a higher magnitude of drift.

To see how the performance metrics are acting in the experiments, the
correlation matrices of the two- and four-dimensional experiments between the
degradation rates of different performance metrics used to evaluate the models
have been plotted. The correlation matrices are shown in Fig. 4 and Fig. 5.
From the matrices it can be seen that a strong correlation between the
degradation rates of the performance metrics in the two-dimensional
experiments (see Fig. 4). This indicates that the performance has been stirred
in the same direction across the different metrics. However, this correlation
between the degradation rates is lower in the four-dimensional experiments
(see Fig. 5). Furthermore, by comparing the degradation rates in Table 1 and
Table 2, it can be seen that the MCC metric is the most affected by changes,
showing higher rates than accuracy and F-score. However, accuracy and F-score
have shown similar degradation rates in most experiments.

Figure 4: Correlation between degradation rates of performance metrics in the
two-dimensional experiments Figure 5: Correlation between degradation rates of
performance metrics in the four-dimensional experiments

###  5.2 Model-Wise Analysis

In this section, the ML model’s performance in the different experimental
settings to address RQ2 is scrutinized. The model-wise results of the two-
dimensional experiments are organized in Fig. 6, while Fig. 7 details the
results of the four-dimensional experiments. The common ground between all ML
models in the two-dimensional datasets is that they are mostly damaged in the
experiments formulated by three types of transformation, i.e., in experiments
Exp1.11 and Exp1.12. Whereas in the four-dimensional datasets, the models are
more affected by the complexity of the classification function, i.e., in the
experiments where the true classification function is $F_{2}$, namely, the
experiments with even numbers.

In the two-dimensional experiments, as shown in Fig. 6(a), the SVM algorithm
was found to be more susceptible to scaling than to translating the data
distribution, i.e., in experiments Exp1.5-1.8. This is interwoven with the
decision boundary built by the SVM algorithm for the classification problem.
Scaling the covariance matrix will lead to changes in the dispersion of the
data points that could require a change in the shape of the decision boundary,
whereas translating the mean would require shifting the decision boundary
without adjusting its shape. In contrast, as shown in Fig. 6(b), the LR
algorithm has shown poorer performance in the translated one-axis distribution
and the scaled two-axis distribution. RF algorithm has exhibited a steady
degradation rate that increases with the complexity of the drift simulated in
the dataset, as shown in Fig. 6(c). Similarly to RF, GNB and KNN algorithms
have shown relative degradation rates to the types of drift simulated in the
data distribution, by scoring low degradation rates in experiments that
include single drifts, and higher rates in experiments that include mixed
types of drift, as shown in Fig. 6(d) and Fig. 6(e).

In four-dimensional experiments, it is clear that performance degradation is
most dominant by the complexity of the class posterior probability function
used across all ML models; see Fig. 7. Specifically, the MCC metric was the
most sensitive, showing the highest degradation rates in all experiments.
However, the degradation rates of accuracy and F-score are quite close to each
other.

(a)

(b)

(c)

(d)

(e)

Figure 6: Model-wise performance evaluation in two-dimensional experiments.

(a)

(b)

(c)

(d)

(e)

Figure 7: Model-wise performance evaluation in four-dimensional experiments.

###  5.3 Region-Based Performance Evaluation

After evaluating the overall performance of the ML models in the presence of
distributional shifts, the performance of the ML models have been evaluated on
subpopulations of the data to address RQ3. To ensure an impartial evaluation,
we assessed the performance on 10,000 data points in each region. The findings
of the region-based evaluation of the two-dimensional experiments are shown in
Table 3 and in Table 4 for the four-dimensional experiments.

From the results, it can be seen that the performance of the different ML
models is very high in the R1 region, that is, in the region with a high
training input density in most experiments. However, the models are more
erroneous in the R2 region, that is, in the region with a low training input
density. This is an important observation that the models tend to be accurate
in the high-training input density regions and work well in such regions, even
though the distribution has changed. Furthermore, upon comparing Tables 1 and
3, and Tables 2 and 4, it can be observed that the results obtained from data
sampled from the same training distribution are similar to the outcomes
observed in region R1. This is because the majority of data points are
concentrated in this region due to a higher training input density. Likewise,
for the drifted distribution, the results are similar to those obtained from
region R2 since the test density is high in this region, resulting in a higher
number of data points contributing to the experiments.

This result can be beneficial for interpreting where models tend to fail when
making predictions. Additionally, it can be used to develop an adaptive
solution for covariate shift situations, where a region-based importance
weight can be introduced to correct the bias and ensure high-robustness in the
affected regions. Moreover, introducing such region-based importance weights
can reduce the cost of computing point-wise importance weights to region-wise
importance weights in the cases of large datasets. This would also solve the
drawback of the conventional importance weighting technique, where $w(x)$ can
become unbounded and very large for a few points, leading to large variances
of the estimated ratios Cortes2014Domain .

In the two-dimensional experiments, it can be seen that the LR and GNB
algorithms perform poorly in the R1 region in the experiments with mixed
drifts. However, they do not tend to be sensitive to this region in the four-
dimensional experiments, as they exhibit similar performance across the
evaluation metrics in all the experiments. It is also noteworthy to see that
the RF algorithm has a high performance in R1 in all two- and four-dimensional
experiments in all evaluation metrics, and most of the misclassifications were
in the R2 region. Similarly to the overall robustness results presented in the
previous section, the MCC appears to be the most susceptible metric compared
to accuracy and F-score in the R2 region, showing higher performance loss
rates. Furthermore, the complexity of the decision function has been shown to
have a higher impact on the R2 region.

The performance of ML models in the context of region-based analysis was
further investigated by conducting an examination of the data points based on
the density ratio values. Specifically, the region R1 consists of data points
with a density ratio of a positive number that is less than 1, while region R2
includes data points with a density ratio higher than 1. To provide a
comprehensive overview of the density ratio values in the experiments,
quartiles were calculated, which can be found summarized in Table 7 for the
two-dimensional experiments, and Table 8 in the appendix section B. The
performance metric used in this analysis is the accuracy, as it was found to
have high correlations with other performance metrics, see Tables 4 and 5.
Therefore, similar insights could be obtained by analyzing the different
performance metrics.

The performance of the ML models in each quartile of the density ratio for the
two-dimensional experiments is shown in Fig. 8. As can be observed, in most
cases, the performance of the models degrades significantly as the density
ratio increases, indicating that the models become less reliable as we move
further from the training domain region. In particular, SVM exhibits the
highest level of sensitivity as the density ratio increases, while RF
demonstrates the highest level of robustness at high density ratio values.
Similar trends are observed in the four-dimensional experiments, as shown in
Fig. 9. However, LR and NB notably exhibit relatively stable performance
across the density ratio quartiles in most experiments.

Table 3: Comparison of region-based performance in the two-dimensional experiments Exp # |  ML model | R1 region performance | R2 region performance
---|---|---|---
Acc | F-score | MCC | Acc | F-score | MCC
Exp1.1 | SVM | 1.0* | 1.0* | 1.0* | 0.9835 | 0.9836 | 0.9673
LR | 0.9846* | 0.9846* | 0.9692* | 0.8848 | 0.8959 | 0.7912
RF | 1.0* | 1.0* | 1.0* | 0.9998 | 0.9998 | 0.9997
GNB | 0.9721* | 0.9713* | 0.9457* | 0.9509 | 0.9478 | 0.906
KNN | 0.9949* | 0.9948* | 0.9897* | 0.961 | 0.9615 | 0.923
Exp1.2 | SVM | 0.9965* | 0.9974* | 0.9923* | 0.9591 | 0.9755 | 0.8616
LR | 0.9784* | 0.9838* | 0.9518* | 0.9437 | 0.9681 | 0.7571
RF | 1.0* | 1.0* | 1.0* | 0.9981 | 0.998 | 0.997
GNB | 0.9697* | 0.9765 | 0.9361* | 0.9661 | 0.9798* | 0.8821
KNN | 0.9974* | 0.998* | 0.9942* | 0.9814 | 0.9892 | 0.9234
Exp1.3 | SVM | 0.9977* | 0.9975* | 0.9954* | 0.9739 | 0.9653 | 0.9446
LR | 0.9826* | 0.981* | 0.9651* | 0.9268 | 0.9125 | 0.8601
RF | 0.9989* | 0.9988* | 0.9978* | 0.9871 | 0.9834 | 0.9733
GNB | 0.9708* | 0.968* | 0.9412* | 0.9291 | 0.91 | 0.8527
KNN | 0.9967* | 0.9965* | 0.9934* | 0.9824 | 0.9772 | 0.963
Exp1.4 | SVM | 0.9966* | 0.9963* | 0.9931* | 0.9911 | 0.9899 | 0.982
LR | 0.9807* | 0.9792* | 0.9612* | 0.9605 | 0.9573 | 0.9236
RF | 0.9988* | 0.9987* | 0.9976* | 0.9955 | 0.9949 | 0.9909
GNB | 0.9727* | 0.9704* | 0.9454* | 0.9656 | 0.9615 | 0.9305
KNN | 0.9968* | 0.9966* | 0.9935* | 0.9883 | 0.9866 | 0.9764
Exp1.5 | SVM | 0.9993* | 0.9994* | 0.9986* | 0.8499 | 0.8941 | 0.6906
LR | 0.9838* | 0.9867* | 0.9661* | 0.9371 | 0.9614 | 0.8104
RF | 1.0* | 1.0* | 1.0* | 0.9989 | 0.9982 | 0.9979
GNB | 0.9774* | 0.9811* | 0.9536* | 0.9498 | 0.9669 | 0.8716
KNN | 0.9973* | 0.9978* | 0.9944* | 0.9894 | 0.9933 | 0.9688
Exp1.6 | SVM | 0.9981* | 0.9974* | 0.9958* | 0.8746 | 0.7204 | 0.6879
LR | 0.9819* | 0.9758* | 0.9617* | 0.9183 | 0.8745 | 0.8296
RF | 1.0* | 1.0* | 1.0* | 0.9981 | 0.998 | 0.996
GNB | 0.9806* | 0.9729* | 0.9587* | 0.951 | 0.9057 | 0.8801
KNN | 0.9974* | 0.9965* | 0.9944* | 0.986 | 0.9752 | 0.9654
Exp1.7 | SVM | 0.9918* | 0.9919* | 0.9836* | 0.9446 | 0.9449 | 0.8893
LR | 0.856* | 0.859* | 0.7118* | 0.7459 | 0.7766 | 0.5118
RF | 1.0* | 1.0* | 1.0* | 0.995 | 0.995 | 0.991
GNB | 0.756* | 0.7291* | 0.5307* | 0.7558 | 0.719 | 0.53
KNN | 0.9881* | 0.9883* | 0.9761* | 0.9196 | 0.9209 | 0.8396
Exp1.8 | SVM | 0.9895* | 0.9908* | 0.9786* | 0.9291 | 0.9369 | 0.8567
LR | 0.8273* | 0.8631* | 0.6566* | 0.6269 | 0.7528 | 0.2628
RF | 0.9982* | 0.9985* | 0.9964* | 0.9862 | 0.9878 | 0.9722
GNB | 0.7844* | 0.8105* | 0.5605* | 0.7001 | 0.7874 | 0.4139
KNN | 0.9895* | 0.9908* | 0.9786* | 0.8821 | 0.9024 | 0.7609
Exp1.9 | SVM | 0.9909* | 0.9904* | 0.9817* | 0.9482 | 0.9463 | 0.8963
LR | 0.837* | 0.8191* | 0.6746* | 0.642 | 0.6084 | 0.2826
RF | 0.9962* | 0.996* | 0.9925* | 0.9645 | 0.9629 | 0.929
GNB | 0.7788* | 0.7309* | 0.5701* | 0.673 | 0.5847 | 0.3631
KNN | 0.9935* | 0.9931* | 0.9869* | 0.9309 | 0.928 | 0.8618
Exp1.10 | SVM | 0.9903* | 0.9896* | 0.9805* | 0.9482 | 0.9499 | 0.8965
LR | 0.8889* | 0.8773* | 0.7779* | 0.4882 | 0.4831 | -0.0206
RF | 0.9967* | 0.9965* | 0.9934* | 0.9644 | 0.9658 | 0.9288
GNB | 0.8265* | 0.7857* | 0.6703* | 0.4985 | 0.4886 | 0.0008
KNN | 0.9941* | 0.9937* | 0.9882* | 0.9345 | 0.9376 | 0.8688
Exp1.11 | SVM | 0.9909* | 0.9916* | 0.9816* | 0.8244 | 0.8163 | 0.652
LR | 0.814* | 0.8369* | 0.625* | 0.5763 | 0.6911 | 0.2213
RF | 0.9956* | 0.996* | 0.9911* | 0.9926 | 0.9926 | 0.9851
GNB | 0.7588* | 0.7722* | 0.5174* | 0.6481 | 0.7257 | 0.3546
KNN | 0.9909* | 0.9916* | 0.9816* | 0.8226 | 0.8276 | 0.6458
Exp1.12 | SVM | 0.9865* | 0.9858* | 0.973* | 0.7086 | 0.6234 | 0.4801
LR | 0.7478* | 0.7056* | 0.4966* | 0.5145 | 0.4746 | 0.0321
RF | 0.9961* | 0.9959* | 0.9923* | 0.9734 | 0.9731 | 0.9479
GNB | 0.6996* | 0.61* | 0.412* | 0.4785 | 0.3576 | -0.0402
KNN | 0.9878* | 0.9872* | 0.9757* | 0.706 | 0.6961 | 0.4146
Table 4: Comparison of region-based performance in the four-dimensional experiments Exp # |  ML model | R1 region performance | R2 region performance
---|---|---|---
Acc | F-score | MCC | Acc | F-score | MCC
Exp2.1 | SVM | 0.9928* | 0.9932* | 0.9856* | 0.9715 | 0.9801 | 0.93
LR | 0.9645 | 0.9662* | 0.9288 | 0.9723* | 0.9307 | 0.9319*
RF | 0.9784* | 0.9795* | 0.9567* | 0.9281 | 0.9491 | 0.8281
GNB | 0.9591* | 0.9597* | 0.9207* | 0.9152 | 0.9372 | 0.8234
KNN | 0.978* | 0.9791* | 0.9558* | 0.9568 | 0.9698 | 0.894
Exp2.2 | SVM | 0.7681* | 0.7662* | 0.5367* | 0.5862 | 0.5955 | 0.1727
LR | 0.5019* | 0.5615* | 0.0011* | 0.4977 | 0.4617 | -0.0058
RF | 0.9214* | 0.922* | 0.8429* | 0.7682 | 0.7639 | 0.5366
GNB | 0.4995 | 0.5741* | -0.0047 | 0.5012* | 0.5074 | 0.0024*
KNN | 0.9008* | 0.9008* | 0.8017* | 0.7607 | 0.754 | 0.5221
Exp2.3 | SVM | 0.9927* | 0.9919* | 0.9853* | 0.9759 | 0.9722 | 0.9514
LR | 0.9696* | 0.9664* | 0.9386* | 0.959 | 0.9553 | 0.92
RF | 0.9767* | 0.9743* | 0.953* | 0.9589 | 0.9538 | 0.917
GNB | 0.9631 | 0.9584* | 0.9258* | 0.9696* | 0.9649 | 0.9386
KNN | 0.9728* | 0.97* | 0.9452* | 0.967 | 0.9627 | 0.9331
Exp2.4 | SVM | 0.7649* | 0.7631* | 0.5298* | 0.5086 | 0.4879 | 0.0168
LR | 0.4958 | 0.4743 | -0.0088 | 0.504* | 0.4857* | 0.0075*
RF | 0.9319* | 0.9311* | 0.864* | 0.7026 | 0.701 | 0.4051
GNB | 0.5039* | 0.5114* | 0.008* | 0.5005 | 0.3178 | -0.0032
KNN | 0.9208* | 0.9204* | 0.8416* | 0.6937 | 0.6924 | 0.3873
Exp2.5 | SVM | 0.9933* | 0.9928* | 0.9865* | 0.9026 | 0.9187 | 0.8121
LR | 0.9648 | 0.9626 | 0.9295 | 0.9678* | 0.9753* | 0.93*
RF | 0.9758* | 0.9742* | 0.9514* | 0.9212 | 0.9365 | 0.8365
GNB | 0.9608* | 0.9565* | 0.9229* | 0.9413 | 0.9521 | 0.8833
KNN | 0.9743* | 0.9726* | 0.9484* | 0.956 | 0.966 | 0.9039
Exp2.6 | SVM | 0.7269* | 0.7179* | 0.4532* | 0.502 | 0.5272 | 0.0037
LR | 0.5045* | 0.4402* | 0.0032 | 0.5021 | 0.1798 | 0.0108*
RF | 0.9189* | 0.9158* | 0.8376* | 0.6035 | 0.6222 | 0.2077
GNB | 0.4896 | 0.4341 | -0.026 | 0.5035* | 0.5227* | 0.0068*
KNN | 0.9059* | 0.9033* | 0.8116* | 0.6201 | 0.6452 | 0.242

(a) Exp1.1

(b) Exp1.2

(c) Exp1.3

(d) Exp1.4

(e) Exp1.5

(f) Exp1.6

(g) Exp1.7

(h) Exp1.8

(i) Exp1.9

(j) Exp1.10

(k) Exp1.11

(l) Exp1.12

Figure 8: Accuracy of machine learning models for each quartile of test-to-
training density ratios in the two-dimensional experiments.

(a) Exp2.1

(b) Exp2.2

(c) Exp2.3

(d) Exp2.4

(e) Exp2.5

(f) Exp2.6

Figure 9: Accuracy of machine learning models for each quartile of test-to-
training density ratios in the four-dimensional experiments.

##  6 Threats to Validity

Like any other empirical study, the main threat to external validity is
related to the generalization of the findings. Although the scope of this
paper is to compare the performance of different ML algorithms under
distributional shifts, the default parameters provided by the scikit-learn
library have been used. Using a fixed set of parameters would narrow the focus
to monitor the performance of the different algorithms rather than to monitor
the same algorithm under different parameter settings. Furthermore, taking the
impact of the models’ parameters into account as a factor, in addition to the
drift parameters, would extend the parameter space of the experiments
expansively. However, different parameter settings would yield different
results clearly, but we argue that the concluding remarks would be the same.

On the other hand, the experiments have been conducted using synthetic data,
which might not always be similar and mimic the real-world context. As a
result, this may affect the generalization of our findings to real-world
datasets. Despite this, in the literature, synthetic datasets are widely used
in research on changing environments Tsuboi2009Direct ;
Shimodaira2000Covariate , as they include information about drift, such as
drift time and type Micevska2021SDDM ; Lima2021Comparative , and they provide
valuable insights and a basis for further research. Moreover, real-world
datasets lack annotations of ground-truth changes, and their underlying PDFs
are often unknown cano2020kappa . Additionally, these generated datasets allow
us to work on controlled classification settings and simulate various drift
situations, and draw concrete conclusions about the performance of the ML
models.

##  7 Conclusion

In this paper, the robustness of the performance of popular machine learning
algorithms was investigated in covariate shift situations through an
exhaustive comparative study. Several problems using a tractable
classification framework have been generated. Each problem is parameterized by
specific conditions that simulate a particular type of change. Our results
show that the Random Forests algorithm is the most robust algorithm in the
two-dimensional experiments, showing the lowest degradation rates in the
evaluation metrics. The complexity of the classification rule has a major
impact on the performance in higher-dimensional experiments.

The decomposition of the input space domain into regions based on the test-to-
training density ratio have allowed to diagnose the models’ performance on
subpopulations of the data points. The experimental results show the high bias
of the algorithms in the regions where the training input density is high,
despite inducing a change in the distribution of the test data points. Our
future work will consist of using this observation to develop a covariate
shift solution based on region-based importance weights.

Additionally, and to address the threats presented in Section 6, we would like
to investigate the effects of the models’ hyperparameters in coping with
distributional changes. Also, the impact of using real-world datasets in our
evaluation environment. Another potential continuation for future research
could be the evaluation of deep learning-based models to further validate the
conclusions drawn from conventional ML models.

## Acknowledgment

This work has been funded by the Knowledge Foundation of Sweden (KKS) through
the Synergy Project AIDA - A Holistic AI-driven Networking and Processing
Framework for Industrial IoT (Rek:20200067).

## Conflict of Interest

The authors have no conflicts of interest to declare that are relevant to the
content of this article.

## Data Availability

The datasets generated and/or analysed during the current study are not
publicly available currently. However, the authors are willing to provide the
data per request.

##  Appendix A Summary of Experimental Settings

This Appendix provides a summary of the parameter settings and specifications
used in the two-dimensional and four-dimensional experiments conducted in this
paper. Tables A and A list the key parameters and their respective values for
the two-dimensional and four-dimensional experiments, respectively.

Table 5: Summary of the two-dimensional experimental settings.
$F_{1}:\frac{1}{2}\left(1+\tanh\left(\min\left(0,x_{1}\right)+4x_{2}\right)\right)$,
$F_{2}:\frac{1}{2}\left(1+\sin\left(\min\left(0,x_{1}\right)+2x_{2}\right)\right)$

Experiment
---

& Transformation type Test data distribution Classification function Exp1.1
One-axis translation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}3\\\
0\end{array}\right],\left[\begin{array}[]{ll}1&0\\\
0&1\end{array}\right]\right)$ $F_{1}$ Exp1.2 One-axis translation
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}3\\\
0\end{array}\right],\left[\begin{array}[]{ll}1&0\\\
0&1\end{array}\right]\right)$ $F_{2}$ Exp1.3 Two-axis translation
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}3\\\
1\end{array}\right],\left[\begin{array}[]{ll}1&0\\\
0&1\end{array}\right]\right)$ $F_{1}$ Exp1.4 Two-axis translation
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}3\\\
1\end{array}\right],\left[\begin{array}[]{ll}1&0\\\
0&1\end{array}\right]\right)$ $F_{2}$ Exp1.5 One-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\
0\end{array}\right],\left[\begin{array}[]{ll}4&0\\\
0&1\end{array}\right]\right)$ $F_{1}$ Exp1.6 One-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\
0\end{array}\right],\left[\begin{array}[]{ll}4&0\\\
0&1\end{array}\right]\right)$ $F_{2}$ Exp1.7 Two-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\
0\end{array}\right],\left[\begin{array}[]{ll}3&0\\\
0&2\end{array}\right]\right)$ $F_{1}$ Exp1.8 Two-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\
0\end{array}\right],\left[\begin{array}[]{ll}3&0\\\
0&2\end{array}\right]\right)$ $F_{2}$ Exp1.9 Translation and scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}3\\\
1\end{array}\right],\left[\begin{array}[]{ll}3&0\\\
0&2\end{array}\right]\right)$ $F_{1}$ Exp1.10 Translation and scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}3\\\
1\end{array}\right],\left[\begin{array}[]{ll}3&0\\\
0&2\end{array}\right]\right)$ $F_{2}$ Exp1.11 Translation, scaling, rotation
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}4\\\
\leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\end{array}\right],\left[\begin{array}[]{ll}3.5&0.5\\\
3.5&0.5\end{array}\right]\right)$ $F_{1}$ Exp1.12 Translation, scaling,
rotation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}4\\\ \leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\end{array}\right],\left[\begin{array}[]{ll}3.5&0.5\\\
0.5&3.5\end{array}\right]\right)$ $F_{2}$

Table 6: Summary of the four-dimensional experimental settings.
$F_{3}:\frac{1}{2}\left(1+\tanh\left(\min\left(0,x_{1}\right)-x_{2}+2x_{3}+2x_{4}\right)\right)$,
$F_{4}:\frac{1}{2}\left(1+\sin\left(\min\left(0,x_{1}\right)+4x_{2}-3x_{3}+2x_{4}\right)\right)$

& Transformation type Test data distribution Classification function Exp2.1
Two-axis translation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}0\\\ \leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}2\\\
\leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\\\
1\end{array}\right],\left[\begin{array}[]{llll}1&0&0&0\\\ 0&1&0&0\\\
0&0&1&0\\\ 0&0&0&1\end{array}\right]\right)$ $F_{3}$ Exp2.2 Two-axis
translation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}0\\\ \leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}2\\\
\leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\\\
1\end{array}\right],\left[\begin{array}[]{llll}1&0&0&0\\\ 0&1&0&0\\\
0&0&1&0\\\ 0&0&0&1\end{array}\right]\right)$ $F_{4}$ Exp2.3 Two-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\ 0\\\
0\\\ 0\end{array}\right],\left[\begin{array}[]{llll}3&0&0&0\\\ 0&2&0&0\\\
0&0&2&0\\\ 0&0&0&3\end{array}\right]\right)$ $F_{3}$ Exp2.4 Two-axis scaling
$N\left(\boldsymbol{x}\mathchar 24635\relax\;\left[\begin{array}[]{l}0\\\ 0\\\
0\\\ 0\end{array}\right],\left[\begin{array}[]{llll}3&0&0&0\\\ 0&2&0&0\\\
0&0&2&0\\\ 0&0&0&3\end{array}\right]\right)$ $F_{4}$ Exp2.5 Translation,
scaling, rotation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}0\\\ \leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}2\\\
\leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\\\
1\end{array}\right],\left[\begin{array}[]{llll}3&0&0&0\\\ 0&2&0&0\\\
0&0&2&0\\\ 0&0&0&3\end{array}\right]\right)$ $F_{3}$ Exp2.6 Translation,
scaling, rotation $N\left(\boldsymbol{x}\mathchar
24635\relax\;\left[\begin{array}[]{l}0\\\ \leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}2\\\
\leavevmode\hphantom{0}\hbox
to0.0pt{\hss\leavevmode\resizebox{4.40004pt}{0.0pt}{$-$}}1\\\
1\end{array}\right],\left[\begin{array}[]{llll}2.5&0.5&0&0\\\ 0.5&2.5&0&0\\\
0&0&2&0\\\ 0&0&0&3\end{array}\right]\right)$ $F_{4}$

##  Appendix B Summary of Quartile Values for Test-to-Training Density Ratios

This appendix section includes summary tables of quartile values for test-to-
training density ratios in the two-dimensional and four-dimensional
experiments. Table 7 shows the quartile values for the two-dimensional
experiments, while Table 8 shows the quartile values for the four-dimensional
experiments. The reported values include the minimum value (0%), the 25th
percentile (25%), the median value (50%), the 75th percentile (75%) and the
maximum value (100%). These quartile values are useful in assessing the spread
of the test-to-training density ratios.

Table 7: Summary of quartile values for test-to-training density ratios in the two-dimensional experiments. Experiment | 0% | 25% | 50% | 75% | 100%
---|---|---|---|---|---
Exp1.1 | 7.893e-04 | 3.550e-01 | 1.002e+00 | 1.126e+02 | 4.159e+04
Exp1.2 | 7.798e-04 | 3.685e-01 | 1.003e+00 | 1.187e+02 | 4.272e+04
Exp1.3 | 8.932e-04 | 3.779e-01 | 1.002e+00 | 1.971e+02 | 1.046e+05
Exp1.4 | 6.042e-04 | 3.587e-01 | 1.001e+00 | 1.876e+02 | 9.802e+04
Exp1.5 | 5.000e-01 | 5.852e-01 | 1.001e+00 | 3.749e+00 | 1.971e+03
Exp1.6 | 5.000e-01 | 5.811e-01 | 1.002e+00 | 3.698e+00 | 1.670e+03
Exp1.7 | 4.083e-01 | 5.922e-01 | 1.003e+00 | 2.781e+00 | 1.910e+02
Exp1.8 | 4.083e-01 | 5.961e-01 | 1.004e+00 | 2.821e+00 | 2.043e+02
Exp1.9 | 2.611e-02 | 2.942e-01 | 1.002e+00 | 2.958e+02 | 4.480e+08
Exp1.10 | 2.618e-02 | 3.024e-01 | 1.001e+00 | 2.838e+02 | 4.531e+08
Exp1.11 | 6.460e-03 | 2.264e-01 | 1.005e+00 | 1.150e+04 | 6.803e+12
Exp1.12 | 6.009e-03 | 2.405e-01 | 1.005e+00 | 1.204e+04 | 5.318e+12
Table 8: Summary of quartile values for test-to-training density ratios in the four-dimensional experiments. Experiment | 0% | 25% | 50% | 75% | 100%
---|---|---|---|---|---
Exp2.1 | 1.789e-03 | 4.076e-01 | 1.001e+00 | 2.818e+01 | 3.185e+03
Exp2.2 | 1.333e-03 | 4.001e-01 | 1.002e+00 | 2.863e+01 | 3.180e+03
Exp2.3 | 1.683e-01 | 4.952e-01 | 1.002e+00 | 5.169e+00 | 1.832e+03
Exp2.4 | 1.682e-01 | 4.875e-01 | 1.002e+00 | 5.284e+00 | 1.408e+03
Exp2.5 | 2.087e-02 | 3.180e-01 | 1.001e+00 | 7.914e+01 | 4.845e+06
Exp2.6 | 1.875e-02 | 3.291e-01 | 1.001e+00 | 8.119e+01 | 5.672e+06

## References

  *   * (1) L’heureux, A., Grolinger, K., Elyamany, H.F., Capretz, M.A.: Machine learning with big data: Challenges and approaches. IEEE Access 5, 7776–7797 (2017)
  * (2) Witten, I.H., Frank, E., Hall, M.A., Pal, C.J.: Chapter 9 - probabilistic methods. In: Witten, I.H., Frank, E., Hall, M.A., Pal, C.J. (eds.) Data Mining (Fourth Edition), Fourth edition edn., pp. 335–416. Morgan Kaufmann, San Francisco, CA, USA (2017)
  * (3) Brownlee, J.: Probability for machine learning: Discover how to harness uncertainty with Python (2019)
  * (4) Gama, J.a., Žliobaitundefined, I., Bifet, A., Pechenizkiy, M., Bouchachia, A.: A survey on concept drift adaptation. ACM Comput. Surv. 46(4) (2014)
  * (5) Lu, J., Liu, A., Dong, F., Gu, F., Gama, J., Zhang, G.: Learning under concept drift: A review. IEEE Transactions on Knowledge and Data Engineering 31(12), 2346–2363 (2019)
  * (6) Moreno-Torres, J.G., Raeder, T., Alaiz-Rodríguez, R., Chawla, N.V., Herrera, F.: A unifying view on dataset shift in classification. Pattern Recognition 45(1), 521–530 (2012)
  * (7) Raza, H., Prasad, G., Li, Y.: Ewma model based shift-detection methods for detecting covariate shifts in non-stationary environments. Pattern Recognition 48(3), 659–669 (2015)
  * (8) Bayram, F., Ahmed, B.S., Kassler, A.: From concept drift to model degradation: An overview on performance-aware drift detectors. Knowledge-Based Systems 245, 108632 (2022)
  * (9) Shimodaira, H.: Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference 90(2), 227–244 (2000)
  * (10) Sugiyama, M., Kawanabe, M.: Machine Learning in Non-Stationary Environments: Introduction to Covariate Shift Adaptation. The MIT Press, USA (2012)
  * (11) Tsymbal, A.: The problem of concept drift: definitions and related work. Computer Science Department, Trinity College Dublin (2004)
  * (12) Tasche, D.: Fisher consistency for prior probability shift. The Journal of Machine Learning Research 18(1), 3338–3369 (2017)
  * (13) Li, F., Lam, H., Prusty, S.: Robust importance weighting for covariate shift. In: International Conference on Artificial Intelligence and Statistics, pp. 352–362 (2020). PMLR
  * (14) Subbaswamy, A., Saria, S.: From development to deployment: dataset shift, causality, and shift-stable models in health ai. Biostatistics 21(2), 345–352 (2020)
  * (15) Schneider, S., Rusak, E., Eck, L., Bringmann, O., Brendel, W., Bethge, M.: Improving robustness against common corruptions by covariate shift adaptation. Advances in Neural Information Processing Systems 33, 11539–11551 (2020)
  * (16) Duchi, J.C., Hashimoto, T., Namkoong, H.: Distributionally robust losses against mixture covariate shifts. Under review 2 (2019)
  * (17) Fei, G., Liu, B.: Social media text classification under negative covariate shift. In: Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 2347–2356 (2015)
  * (18) He, H., Zha, S., Wang, H.: Unlearn dataset bias in natural language inference by fitting the residual. arXiv preprint arXiv:1908.10763 (2019)
  * (19) Wiemann, P.F., Klein, N., Kneib, T.: Correcting for sample selection bias in bayesian distributional regression models. Computational Statistics & Data Analysis 168, 107382 (2022)
  * (20) Tsuboi, Y., Kashima, H., Hido, S., Bickel, S., Sugiyama, M.: Direct density ratio estimation for large-scale covariate shift adaptation. Journal of Information Processing 17, 138–155 (2009)
  * (21) Sugiyama, M., Krauledat, M., Müller, K.-R.: Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research 8(5) (2007)
  * (22) Subbaswamy, A., Adams, R., Saria, S.: Evaluating model robustness and stability to dataset shift. In: International Conference on Artificial Intelligence and Statistics, pp. 2611–2619 (2021). PMLR
  * (23) Liu, H., Wu, Y., Cao, Y., Lv, W., Han, H., Li, Z., Chang, J.: Well logging based lithology identification model establishment under data drift: A transfer learning method. Sensors 20(13), 3643 (2020)
  * (24) Sakai, T., Shimizu, N.: Covariate shift adaptation on learning from positive and unlabeled data. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol. 33, pp. 4838–4845 (2019)
  * (25) Quionero-Candela, J., Sugiyama, M., Schwaighofer, A., Lawrence, N.D.: Dataset Shift in Machine Learning. The MIT Press, USA (2009)
  * (26) Huang, J., Gretton, A., Borgwardt, K., Schölkopf, B., Smola, A.: Correcting sample selection bias by unlabeled data. Advances in neural information processing systems 19 (2006)
  * (27) Sugiyama, M., Nakajima, S., Kashima, H., Buenau, P., Kawanabe, M.: Direct importance estimation with model selection and its application to covariate shift adaptation. Advances in neural information processing systems 20 (2007)
  * (28) Kanamori, T., Hido, S., Sugiyama, M.: A least-squares approach to direct importance estimation. The Journal of Machine Learning Research 10, 1391–1445 (2009)
  * (29) Sugiyama, M., Suzuki, T., Nakajima, S., Kashima, H., von Bünau, P., Kawanabe, M.: Direct importance estimation for covariate shift adaptation. Annals of the Institute of Statistical Mathematics 60(4), 699–746 (2008)
  * (30) Chapaneri, S.V., Jayaswal, D.J.: Covariate shift adaptation for structured regression with frank–wolfe algorithms. IEEE Access 7, 73804–73818 (2019)
  * (31) Alaiz-Rodríguez, R., Japkowicz, N.: Assessing the impact of changing environments on classifier performance. In: Conference of the Canadian Society for Computational Studies of Intelligence, pp. 13–24 (2008). Springer
  * (32) Abbasian, H., Drummond, C., Japkowicz, N., Matwin, S.: Robustness of classifiers to changing environments. In: Canadian Conference on Artificial Intelligence, pp. 232–243 (2010). Springer
  * (33) Chen, M., Goel, K., Sohoni, N.S., Poms, F., Fatahalian, K., Ré, C.: Mandoline: Model evaluation under distribution shift. In: International Conference on Machine Learning, pp. 1617–1629 (2021). PMLR
  * (34) Sagawa, S., Koh, P.W., Hashimoto, T.B., Liang, P.: Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08731 (2019)
  * (35) Garg, S., Balakrishnan, S., Lipton, Z.C., Neyshabur, B., Sedghi, H.: Leveraging unlabeled data to predict out-of-distribution performance. In: ICLR (2022)
  * (36) Guillory, D., Shankar, V., Ebrahimi, S., Darrell, T., Schmidt, L.: Predicting with confidence on unseen distributions. In: Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1134–1144 (2021)
  * (37) Deng, W., Zheng, L.: Are labels always necessary for classifier accuracy evaluation? In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15069–15078 (2021)
  * (38) Recht, B., Roelofs, R., Schmidt, L., Shankar, V.: Do imagenet classifiers generalize to imagenet? In: International Conference on Machine Learning, pp. 5389–5400 (2019). PMLR
  * (39) Taori, R., Dave, A., Shankar, V., Carlini, N., Recht, B., Schmidt, L.: Measuring robustness to natural distribution shifts in image classification. Advances in Neural Information Processing Systems 33, 18583–18599 (2020)
  * (40) Miller, J.P., Taori, R., Raghunathan, A., Sagawa, S., Koh, P.W., Shankar, V., Liang, P., Carmon, Y., Schmidt, L.: Accuracy on the line: on the strong correlation between out-of-distribution and in-distribution generalization. In: International Conference on Machine Learning, pp. 7721–7735 (2021). PMLR
  * (41) Yadav, C., Bottou, L.: Cold case: The lost mnist digits. Advances in neural information processing systems 32 (2019)
  * (42) Miller, J., Krauth, K., Recht, B., Schmidt, L.: The effect of natural distribution shift on question answering models. In: International Conference on Machine Learning, pp. 6905–6916 (2020). PMLR
  * (43) Rajpurkar, P., Zhang, J., Lopyrev, K., Liang, P.: Squad: 100,000+ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250 (2016)
  * (44) Sugiyama, M., Krauledat, M., Müller, K.-R.: Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research 8(5) (2007)
  * (45) Hachiya, H., Sugiyama, M., Ueda, N.: Importance-weighted least-squares probabilistic classifier for covariate shift adaptation with application to human activity recognition. Neurocomputing 80, 93–101 (2012)
  * (46) Almeida, P.R., Oliveira, L.S., Britto Jr, A.S., Sabourin, R.: Adapting dynamic classifier selection for concept drift. Expert Systems with Applications 104, 67–85 (2018)
  * (47) Khamassi, I., Mouchaweh, M.S., Hammami, M., Ghédira, K.: Discussion and review on evolving data streams and concept drift adapting. Evolving Systems 9, 1–23 (2018)
  * (48) Cortes, C., Vapnik, V.: Support-vector networks. Machine learning 20(3), 273–297 (1995)
  * (49) Hastie, T., Tibshirani, R., Friedman, J.H., Friedman, J.H.: The Elements of Statistical Learning: Data Mining, Inference, and Prediction vol. 2. Springer, New York (2009)
  * (50) Breiman, L.: Random forests. Machine learning 45(1), 5–32 (2001)
  * (51) Bishop, C.M., Nasrabadi, N.M.: Pattern Recognition and Machine Learning vol. 4. Springer, New York (2006)
  * (52) Hand, D.J.: Principles of data mining. Drug safety 30(7), 621–622 (2007)
  * (53) Ovadia, Y., Fertig, E., Ren, J., Nado, Z., Sculley, D., Nowozin, S., Dillon, J., Lakshminarayanan, B., Snoek, J.: Can you trust your model’s uncertainty? evaluating predictive uncertainty under dataset shift. Advances in neural information processing systems 32 (2019)
  * (54) Amodei, D., Olah, C., Steinhardt, J., Christiano, P., Schulman, J., Mané, D.: Concrete problems in ai safety. arXiv preprint arXiv:1606.06565 (2016)
  * (55) Lesch, S., Kleinbauer, T., Alexandersson, J.: A new metric for the evaluation of dialog act classification. In: Proceedings of the 9th Workshop on the Semantics and Pragmatics of Dialogue (SEMDIAL: DIALOR), Nancy, France, pp. 143–6 (2005). Citeseer
  * (56) Rabanser, S., Günnemann, S., Lipton, Z.: Failing loudly: An empirical study of methods for detecting dataset shift. Advances in Neural Information Processing Systems 32 (2019)
  * (57) Clark, C., Yatskar, M., Zettlemoyer, L.: Don’t take the easy way out: ensemble based methods for avoiding known dataset biases. arXiv preprint arXiv:1909.03683 (2019)
  * (58) Shafieezadeh Abadeh, S., Mohajerin Esfahani, P.M., Kuhn, D.: Distributionally robust logistic regression. Advances in Neural Information Processing Systems 28 (2015)
  * (59) Atashpaz-Gargari, E., Sima, C., Braga-Neto, U.M., Dougherty, E.R.: Relationship between the accuracy of classifier error estimation and complexity of decision boundary. Pattern recognition 46(5), 1315–1322 (2013)
  * (60) Cortes, C., Mohri, M.: Domain adaptation and sample bias correction theory and algorithm for regression. Theoretical Computer Science 519, 103–126 (2014)
  * (61) Micevska, S., Awad, A., Sakr, S.: Sddm: an interpretable statistical concept drift detection method for data streams. Journal of Intelligent Information Systems 56(3), 459–484 (2021)
  * (62) Lima, M., A Fagundes, R.A.d., et al.: A comparative study on concept drift detectors for regression. In: Brazilian Conference on Intelligent Systems, pp. 390–405 (2021). Springer
  * (63) Cano, A., Krawczyk, B.: Kappa updated ensemble for drifting data stream mining. Machine Learning 109, 175–218 (2020)