Modern machine learning algorithms should not assume that they will deal with finite, closed collections of data. Contemporary data sources generate new information constantly and at a high speed. This combination of velocity and volume gave birth to the notion of data streams that constantly expand and flood the computing system (Bifet et al., 2019) . Data stream cannot be stored in memory and must be analyzed on the fly, without latency that may reduce the responsiveness and lead to a bottleneck. Such characteristics pose new challenges for machine learning algorithms. They need not only to display a high predictive accuracy, but also be capable of fast incorporation of new information, being computationally lightweight and responsive. The recent COVID-19 pandemic is an example of such a scenario, where models needed to be updated daily, whenever new information become available (Chatterjee et al., 2020) . Due to the novelty of this disease and scarce access to ground truth, any new confirmed data was extremely valuable and updating the predictive model was of crucial importance. Efficient learning from data streams calls for such algorithms that can incorporate new data without a need for being retrained from scratch. Furthermore, algorithms dedicated to data stream mining problems must take into account the possibility of dealing with dynamic and non-stationary distributions (Ditzler et al., 2015) . Properties of data may change over time, making previously trained model outdated and forcing constant adaptation to changes. The ever-changing nature of data streams is known as concept drift.
Concept drift can originate from the changes in underlying data generators (e.g., class distributions) or simply from having a lack of access to truly stable and well-defined collections of instances (Lu et al., 2019) . The former is the most common case, where the problem under consideration is subject to non-stationary changes and shifts in its nature. Recommendation systems are excellent examples of such naturally occurring drifts, as the tastes of users may change over time. An example of more rapid changes would include a sensor network, where one of the sensors becomes suddenly damaged and the entire system needs to adapt to the new situation (Liu et al., 2017) . The latter case is strongly connected with the problem of limited access to ground truth in data streams (Masud et al., 2011) . As we deal with constantly arriving instances, it may be impossible to provide a label for every one of them. Therefore, this becomes a problem of managing budget (how many instances can we afford to analyze and label) and time (how quickly are we able to label selected instances) (Lughofer, 2017) . Here, concept drift can be seen as a byproduct of the exploration-exploitation trade-off, where as we learn more about the underlying distributions, we need to update the previous models accordingly ( Korycki and Krawczyk, 2017) .
While there is a plethora of methods dedicated to explicit or implicit concept drift detection, they all assume that the occurrence of the drift originates purely in the underlying changes in data sources (Sethi and Kantardzic, 2018) . But what would happen if we considered the potential presence of a malicious party, aiming at attacking our data stream mining system (Biggio and Roli, 2018) ? Adversarial learning in the presence of malicious data and poisoning attacks recently gained a significant attention (Miller et al., 2020) . However, this area of research focuses on dealing with corrupted training/testing sets (Biggio et al., 2012; Xiao et al., 2015) and handling potentially dangerous instances present there (Umer et al., 2019) . Creating artificial adversarial instances (Gao et al., 2020) or using evasion (Mahloujifar et al., 2019) are considered as the most efficient approaches. The adversarial learning set-up has rarely been discussed in the data stream context, where adversarial instances may be injected into the stream at any point. One should consider the dangerous potential of introducing adversarial concept drift into the stream. Such a fake change may either lead to a premature and unnecessary adaptation to false changes, or slow down the adaptation to the real concept drift. Analyzing the presence of adversarial data and poisoning attack in the streaming setting is a challenging, yet important direction towards making modern machine learning systems truly robust. Goal of the paper. To develop concept drift detector capable of efficient change detection, while being robust to adversarial and poisoning attacks that inject fake concept drifts. Summary of the content. In this paper, we propose a holistic analysis of the adversarial concept drift problem, together with a robust framework for handling poisoning attacks coming from data streams. We discuss the nature of adversarial concept drift and introduce a taxonomy of different types of possible attacks -based on poisoning instances or entire concepts. This allows us to understand the nature of the problem and gives a foundation for formulating a robust concept drift detector. We achieve this by introducing a novel and trainable drift detector based on Restricted Boltzmann Machine. It is capable of learning the compressed properties of the current state of stream and using a reconstruction error to detect the presence of concept drifts. In order to make it robust to adversarial and corrupted instances, we use a robust online gradient descent approach, together with a dedicated energy function used in our neural network. Finally, we introduce Relative Loss of Robustness -a new measure for evaluating the robustness of concept drift detectors to varying levels of adversarial instances injected into the data stream. Main contributions. This paper offers the following contributions to the field of learning from drifting data streams:
-Taxonomy of adversarial concept drifts: we discuss the potential nature of poisoning attacks that may result in adversarial concept drift occurrence and their influence on drift detectors. We also formulate scenarios that can be used to evaluate the robustness of an algorithm dedicated to data stream mining. -Robust concept drift detector: we introduce a novel drift detector based on Restricted Boltzmann Machine that is augmented with robust online gradient procedure and dedicated energy function to alleviate the influence of poisoned instances on the detector.
-Measure of robustness to adversarial drift: we propose Relative Loss of Robustness, an aggregated measure used to analyze the effects of various levels of adversarial drifts injected into the stream.
-Extensive experimental study: we evaluate the robustness of the proposed and state-of-the-art drift detectors, using a carefully designed experimental test bed that involves fully and sparsely labeled data stream benchmarks.
Data stream is defined as a sequence < S 1 , S 2 , ..., S n , ... >, where each element S j is a new instance. In this paper, we assume the (partially) supervised learning scenario with classification task and thus we define each instance as
is a joint distribution of the j-th instance, defined by a d-dimensional feature space and assigned to class y. Each instance is independent and drawn randomly from a probability distribution Ψ j (x, y).
Concept drift. When all instances come from the same distribution, we deal with a stationary data stream. In real-world applications data very rarely falls under stationary assumptions (Masegosa et al., 2020) . It is more likely to evolve over time and form temporary concepts, being subject to concept drift (Lu et al., 2019) . This phenomenon affects various aspects of a data stream and thus can be analyzed from multiple perspectives. One cannot simply claim that a stream is subject to the drift. It needs to be analyzed and understood in order to be handled adequately to specific changes that occur Webb, 2019, 2020 ). More precise approaches may help us achieving faster and more accurate adaptation (Shaker and Hüllermeier, 2015) . Let us now discuss the major aspects of concept drift and its characteristics.
Influence on decision boundaries. Firstly, we need to take into account how concept drift impacts the learned decision boundaries, distinguishing between real and virtual concept drifts (Oliveira et al., 2019) . The former influences previously learned decision rules or classification boundaries, decreasing their relevance for newly incoming instances. Real drift affects posterior probabilities p j (y|x) and additionally may impact unconditional probability density functions. It must be tackled as soon as it appears, since it impacts negatively the underlying classifier. Virtual concept drift affects only the distribution of features x over time:
where Y is a set of possible values taken by S j . While it seems less dangerous than real concept drift, it cannot be ignored. Despite the fact that only the values of features change, it may trigger false alarms and thus force unnecessary and costly adaptations.
Locality of changes. It is important to distinguish between global and local concept drifts (Gama and Castillo, 2006) . The former one affects the entire stream, while the latter one affects only certain parts of it (e.g., regions of the feature space, individual clusters of instances, or subsets of classes). Determining the locality of changes is of high importance, as rebuilding the entire classification model may not be necessary. Instead, one may update only certain parts of the model or sub-models, leading to a more efficient adaptation.
Speed of changes. Here we distinguish between sudden, gradual, and incremental concept drifts (Lu et al., 2019) .
-Sudden concept drift is a case when instance distribution abruptly changes with t-th example arriving from the stream:
-Incremental concept drift is a case when we have a continuous progression from one concept to another (thus consisting of multiple intermediate concepts in between), such that the distance from the old concept is increasing, while the distance to the new concept is decreasing:
-Gradual concept drift is a case where instances arriving from the stream oscillate between two distributions during the duration of the drift, with the old concept appearing with decreasing frequency:
where δ ∈ [0, 1] is a random variable.
Recurrence. In many scenarios it is possible that a previously seen concept from k-th iteration may reappear D j+1 = D j−k over time (Sobolewski and Wozniak, 2017) . One may store models specialized in previously seen concepts in order to speed up recovery rates after a known concept re-emerges (Guzy and Wozniak, 2020) .
Presence of noise. Apart from concept drift, one may encounter other types of changes in data. They are connected with the potential appearance of incorrect information in the stream and known as blips or noise. The former stands for singular random changes in a stream that should be ignored and not mistaken for a concept drift. The latter stands for significant corruption in the feature values or class labels and must be filtered out in order to avoid feeding false (Krawczyk and Cano, 2018) or even adversarial information to the classifier (Sethi and Kantardzic, 2018) .
Feature drift. This is a type of change that happens when a subset of features becomes, or stops to be, relevant to the learning task . Additionally, new features may emerge (thus extending the feature space), while the old ones may cease to arrive.
Drift detectors. In order to be able to adapt to evolving data streams, classifiers must either have explicit information on when to update their model, or use continuous learning to follow the progression of a stream. Concept drift detectors are external tools that can be paired with any classifier and used to monitor a state of the stream (de Barros and de Carvalho Santos, 2018) . Usually, this is based on tracking the error of the classifier (Pinage et al., 2020) or measuring the statistical properties of data . Drift detectors emit two-level signals. The warning signal means that changes start to appear in the stream and recent instances should be stored in a dedicated buffer. This buffer is used to train a new classifier in the background. The drift signal means that changes are significant enough to require adaptation and the old classifier must be replaced with the new one trained on the most recent buffer of data. This reduces the cost of adaptation by lowering the number of times when we train the new classifier, but may be subject to costly false alarms or missing changes appearing locally or on a smaller magnitude. One of the first and most popular drift detectors is Drift Detection Method (DDM) (Gama et al., 2004 ) that analyzes the standard deviation of errors coming from the underlying classifier. DDM assumes that the increase in error rates directly corresponds to changes in incoming data stream and thus can be used to signal the presence of drift. This concept was extended by Early Drift Detection Method (EDDM) (Baena-Garca et al., 2006) by replacing the standard error deviation with a distance between two consecutive errors. This makes EDDM more reactive to slower, gradual changes in the stream, at the cost of losing sensitivity to sudden drifts. Reactive Drift Detection Method (RDDM) (de Barros et al., 2017) is an improvement upon DDM that allows detecting sudden and local changes under access to a reduced number of instances. RDDM offers better sensitivity than DDM by implementing a pruning mechanism for discarding outdated instances. Adaptive Windowing (ADWIN) (Bifet and Gavaldà, 2007) is based on a dynamic sliding window that adjusts its size according to the size of the stable concepts in the stream. ADWIN stores two sub-windows for old and new concepts, detecting a drift when mean values in these sub-windows differ more than a given threshold. Statistical Test of Equal Proportions (STEPD) (Nishida and Yamauchi, 2007) also keeps two sub-window, but uses a statistical test with continuity correction to determine if instances in both windows originate from similar or different distributions. Page-Hinkley Test (PHT) (Sebastião and Fernandes, 2017) measures the current accuracy, as well as mean accuracy over a window of older instances. PHT computes cumulative and minimum differences between those two values and compares them to a predefined threshold, assuming that higher values of cumulative differences indicate increasing presence of concept drift. Exponentially Weighted Moving Average for Concept Drift Detection (ECDD) (Ross et al., 2012) detects changes in the mean of sequences of instances realized as random variables, without the need for a prior knowledge about their mean and standard deviation. Sequential Drift (SEQDRIFT) (Pears et al., 2014) can be seen as an improved version of ADWIN, where the sub-window of instances from the old concept is obtained by a reservoir sampling with a single-pass approach. Additionally, the comparison between two windows is done using the Bernstein bound, alleviating the need for a user-specified threshold. SEED Drift Detector (SEED) (Huang et al., 2014) is another example of ADWIN extension, where the Hoeffding's inequality with Bonferroni correction is used as the threshold bound for comparing two sub-windows. Furthermore, SEED compresses its sub-windows by eliminating redundant instances from homogeneous parts of its windows. Drift Detection Methods based on the Hoeffding's bounds (HDDM) (Blanco et al., 2015) uses the identical bound as SEED, but drops the idea of sub-windows and focuses on measuring both false positive and false negative rates. Fast Hoeffding Drift Detection Method (FHDDM) (Pesaranghader and Viktor, 2016 ) is yet another drift detector utilizing the popular Hoeffding's inequality, but its novelty lies in measuring the probability of correct decisions returned by the underlying classifier. Fisher Test Drift Detector (FTDD) (de Lima Cabral and de is an extension of STEPD that addressees the issue of sub-windows being of insufficient size or holding imbalanced distributions. Wilcoxon Rank Sum Test Drift Detector (WSTD) (de is another extension of STEPD that uses the Wilcoxon rank-sum statistical test for comparing distributions in sub-windows. Diversity Measure as Drift Detection Method (DMDDM) (Mahdi et al., 2020) uses a combination of a pairwise diversity measure and PHT to offer an aggregated measure of difference between two concepts.
Recently, we can see the emergence of the ensemble learning paradigm applied to drift detectors . Dynamic Classifier Selection with Local Accuracy and Drift Detector (DCS-LA+DDM) (Pinage et al., 2020) uses an ensemble of base classifiers together with a single drift detector. However, while based on ensemble idea, one cannot consider it a true ensemble of drift detectors. Drift Detection Ensemble (DDE) (Maciel et al., 2015) uses a combination of three independent drift detectors, which can be seen as a heterogeneous ensemble drift detector. Stacking Fast Hoeffding Drift Detection Method (FHDDMS) (Pesaranghader et al., 2018) uses a sequential combination of FHDDM detectors. Ensemble Drift Detection with Feature Subspaces (EDFS) ) uses a combination of in-cremental Kolmogorov-Smirnov detectors (dos Reis et al., 2016) deployed on a set of diverse feature subspaces. Every time drift is detected, the subspaces are reconstructed, allowing EDFS to capture the new data characteristics. EDFS can be seen as a homogeneous ensemble drift detector. Classifiers for drifting data streams. Alternative approaches assume using classifiers that are capable of learning in an incremental or online manner. Sliding windows storing only the most recent instances are very popular, allowing for natural forgetting of older instances (Ramírez-Gallego et al., 2017; Roseberry et al., 2019) . The size of the window is an important parameter and adapting it over time seems to yield the best results (Bifet and Gavaldà, 2007) . Online learners are capable of learning instance by instance, discarding data after it passed the training procedure. They are very efficient on their own, but need to be equipped with a forgetting mechanism in order not to endlessly grow their complexity (Yu and Webb, 2019) . Adaptive Hoeffding Trees (Bifet and Gavaldà, 2009 ) and gradient-based methods (Jothimurugesan et al., 2018) are among the most popular solutions. Ensemble approaches. Combining multiple classifiers is a very popular and powerful approach for standard learning problems (Wozniak et al., 2014) . The technique transferred seamlessly to data stream mining scenarios, where ensemble approaches have displayed a great efficacy . They not only offer improved predictive power, robustness, and reduction of variance, but also can easily handle concept drift and use it as a natural way of maintaining diversity. By encapsulating new knowledge in the ensemble pool and removing outdated models, one can assure that the base classifiers are continuously mutually complementary, while adapting to changes in the stream. Popular solutions are based on the usage of online versions of bagging (Bifet et al., 2010b) , boosting (Oza and Russell, 2001) , Random Forest , or instance-based clustering (Korycki and Krawczyk, 2018) , as well as dedicated architectures such as Accuracy Updated Ensemble (Brzezinski and Stefanowski, 2014) or Kappa Updated Ensemble (Cano and Krawczyk, 2020) .
In this section, we will discuss: the unique characteristic of adversarial learning scenario in the context of drifting data streams, the inadequacy of existing detectors for handling adversarial instances, why adversarial drift cannot be simply disregarded as a noise, how it impacts the learning from data streams, and what type of poisoning attacks we may expect. Adversarial learning for static data. With the advent of deep learning and numerous success stories of its application in real-life problems, researchers started to notice that deep models can be easily affected by corrupted or noisy information (Elsayed et al., 2018) . Multiple studies reported that even small perturbations in the training data may have devastating effects on the efficacy of the neural model (Su et al., 2019) . While learning in the presence of noisy instances (either in a form of feature noise (Adeli et al., 2019) or label noise (Frénay and Verleysen, 2014) ) has been studied thoroughly in machine learning, the specifics of deep learning gave a rise to novel challenges (Wang et al., 2020) . As deep learning usually deals with complex representations of data, such as images (Dong et al., 2020) or text (Wallace et al., 2019) , noise can be introduced in various new forms and affect multiple types of outputs generated by deep models: predictions, extracted features, embeddings, or generated instances (Choi et al., 2018) . Adversarial learning is nowadays used in the broad context of preparing models to deal with noisy and corrupted data (Zhang et al., 2016) , ether by evasion (Li and Li, 2020) or poisoning attack (Bojchevski and Günnemann, 2019) training schemes. It is important to note that in the literature the term adversarial learning is used for both scenarios with a malicious party attacking the model (Madry et al., 2018 ) and scenarios where corrupted information is the effect of environmental factors (Kaneko and Harada, 2020) . As for the effect on data, it is either assumed that the training set is already corrupted (Cohen et al., 2020) , or that the corruption may appear during the prediction phase and thus the training set must be enriched in order to prepare the model (Xiao et al., 2018) . Unique characteristics of adversarial learning in data streams. Works in adversarial learning assume the static nature of data and the fact that the true nature of classes is known beforehand. Therefore, one may generate instances that differ from the training data in order to predict the nature of noisy or corrupted instances. In this work, we propose to extend the concept of adversarial learning into the data stream scenario with concept drift presence. This poses massive new challenges for the learning algorithms that cannot be tackled by the existing adversarial models. Let us now discuss the unique challenges that are present in the adversarial set-up of learning from data streams.
-The true state of classes is subject to change over time. Data streams are subject to change over time. Therefore, what could be considered an adversarial case, may become a valid instance from a drifted distribution. This prevents us from simply enhancing the training set with artificial adversarial instances, as we cannot know a priori if any changes in the stream originate from the actual drift presence or from an adversarial attack. -Adversarial concept drift should be treated as malicious. In order to inject an adversarial concept drift into data, an attacker must be aware of the nature of data. Through this work, we will consider a scenario with a malicious party providing corrupted, poisoned data with a clear aim of damaging and harming our learning system. Similarities to insider attacks (Tuor et al., 2017) can be drawn, as in both cases poisoning data is prepared in such a way that eludes clear early detection as outliers and damages the learning system over time. -Need to differentiate between valid and adversarial concept drift.
We must always assume that the analyzed stream may be subject to a valid, non-malicious concept drift. This poses a very interesting challenge -how can we differentiate between the changes that we want to follow and changes that may be of adversarial nature? Here, we should assume that concept drift will become more and more present as the stream progresses, while adversarial attacks may have a periodic nature and usually constitute only a small portion of the incoming instances. It is highly unlikely that we will have equal proportions of valid and adversarial instances in the stream. -Robustness to adversarial data cannot hinder the adaptation process. While designing robust machine learning algorithms for adversarial concept drift, we cannot follow the standard procedure that treats all data different from the training set as adversarial ones. A robust learner that treats all new data distributions as corrupted will not be able to adapt to new concepts. We need to design novel algorithms capable of differentiating between valid and adversarial drifts, which in turn will be used to make autonomous and on-the-fly decisions whether the learner should adapt to new data or not. Therefore, we find creating robust concept drift detectors particularly promising direction.
Limitations of existing drift detectors. State-of-the-art drift detectors, discussed in details in Section 2, share common principles. They all monitor some characteristics of newly arriving instances from the data stream and use various thresholds to decide if the new data are different enough to signal concept drift presence. It is easy to notice that the used measures and statistical tests are very sensitive to any perturbations in data and offer no robustness to poisoning attacks. Existing drift detectors concentrate on checking the level of difference between two distributions, without actually analyzing the content of the newly arriving instances. Furthermore, they are realized as simple thresholding modules, not being able to adapt themselves to data at hand. This calls for new drift detectors that have enhanced robustness and can learn properties of data, instead of just measuring some simple statistics. Noisy data streams vs adversarial concept drift. It is important to offer a clear distinction between noisy data streams and adversarial concept drift. The former cases assume that either some features or labels have been incorrectly measured or provided by annotators. They do not have any underlying characteristics and usually come from additive random distributions or human errors. They may misguide the training procedure, but there is no malicious intent associated with them. Adversarial concept drift and associated poisoning attacks assume that there is a malicious party actively working against our machine learning system. The injected poisoned data was designed and crafted in such a way that will purposefully damage the classifier while avoiding easy detection. Adversarial drift must be seen as a coordinated attempt to disturb or completely shut down the system under attack. Negative impacts of poisoning attacks will be discussed next.
Negative impact of adversarial concept drift. In order to offer a complex and holistic view on the problem of adversarial concept drift, let us now dis-cuss the major difficulties imposed by such a phenomenon on the underlying machine learning system:
-Forcing false and unnecessary adaptation. Data stream mining algorithms, primarily detectors or adaptive classifiers, actively monitor the characteristics of the stream and trigger changing the learning model when newly arriving data differ from the previous concepts. Therefore, by injecting an adversarial drift during the stable period of a data stream (when no changes in data distributions are taking place), a false alarm will be raised.
The learning algorithm will be cheated into thinking that a drift is taking place and will adapt to poisoned instances provided by the attacker. This can be used by a malicious party to damage the accuracy of the system at will, e.g., when two competitors are analyzing the same stream of data. Unnecessary adaptation not only will reduce the accuracy of the classifier, but also will consume precious computational resources and time, slowing the system down (Zliobaite et al., 2015) or even paralyzing it completely during the recovery after such an attack (Shaker and Hüllermeier, 2015) .
-Impairing the adaptation process. Adversarial concept drift may also be injected during the occurrence of a valid concept drift. If poisoning instances are well-crafted, they will offer information contrary to the actual changes in data. This will confuse any adaptive learning system, forcing it to adapt to two completely opposing concepts. If the algorithm deals with a high number of poisoned instances, this may lead to a complete nullification of the adaptation process. Even under the assumption that the adversarial concept is much smaller than the valid concept, it will still significantly slow down the adaptation process. The speed of adaptation to new data is of crucial importance and any tampering with it may result in massive financial losses or staying behind the competition.
-Hindering label query process in partially labeled streams. In reallife scenarios, one does not have access to fully labeled streams. As it is impossible to obtain the ground truth for each newly arriving instance, active learning is being used to select the most useful instances for the label query (Lughofer, 2017) . Obtaining labels is connected with budget management (i.e., the monetary cost for paying the annotator or domain expert) and time (i.e., how quickly the expert can label instance under the consideration). Adversarial concept drift will produce a number of instances that will pretend to be useful for the classifier (as they seem to originate from a novel concept). Even if the domain expert will correctly identify them as adversarial instances, the budget and time have already been spent. Therefore, adversarial concept drift is particularly dangerous for partially labeled streams, where it may force misuse of already scarce resources (Zliobaite et al., 2015) .
Taxonomy of adversarial concept drift. We have analyzed and understood the unique nature of adversarial concept drift, the challenges connected with its differentiation from a valid concept drift, and the negative impacts it may have on the learning algorithms. Let us now propose the first taxonomy of poisoning attacks in the streaming scenario: -Adversarial concept drift with instance-based poisoning attacks.
The first type assumes that the malicious party injects singular corrupted instances into the stream. They may be corrupted original instances with flipped labels or with modified feature values. Instance-based attacks are common when the attacker wants to test the robustness of the system and still needs to learn about the distribution of data in the stream. Additionally, supplying independent poisoned instances, especially when done from multiple sources, may be harder to detect that injecting a large number of instances at once. Such attacks, at lower rates, may be picked up by noise/outlier detection techniques. However, these attacks will appear more frequently than natural anomalies and will be crafted with malicious intent, requiring dedicated methods to filter them out. Instance-based poisoning attacks will not cause a false drift detection, but may significantly impair the adaptation to the actual concept drift. Figure 1 depicts the correct adaptation to a valid concept drift, while Figure 2 depicts the same scenario with a hindered or exaggerated adaptation affected by the instance-based poisoning attacks.
-Adversarial concept drift with concept-based poisoning attacks.
The second type assumes that the malicious party have crafted poisoned instances that form a coherent concept. This can be seen as injecting an adversarial distribution of data that fulfills the cluster and smoothness assumptions. Therefore, now we must handle a difficult attack that will elude any outlier/noise/novelty detection methods. With the concept-based poisoning attack, we may assume that the malicious party poses a significant knowledge about the real data distributions and is able to craft such concepts that are going to directly cause false alarms and conflicts with valid concept drift. The effects of concept-based poisoning attacks are much more significant that its instance-based counterparts and may result, if undetected, in significant harm to the learning system and increased recovery times for rebuilding the model. Such attacks can both cause false drift detection and hinder, critically misguide or even completely nullify, the adaptation of the learning algorithm. Figure 1 depicts the correct adaptation to a valid concept drift, while Figure 2 depicts the same scenario with an incorrect adaptation thwarted by the concept-based poisoning attacks.
In this section, we describe in detail the proposed concept drift detector, realized as a trainable Restricted Boltzmann Machine with enhanced robustness to adversarial instances.
Overview of the proposed method. We introduce a novel concept drift detector that is characterized by an increased robustness to adversarial concept drift, while maintaining high sensitivity to valid concept drift. It is realized as a Restricted Boltzmann Machine with leveraged robustness via improved online gradient calculation and extended energy function. It is a fully trainable drift detector, capable of autonomous adaptation to the current state of the stream and not relying on user-defined thresholds or statistical tests.
Neural network architecture. Restricted Boltzmann Machines (RBMs) are a popular family of generative two-layered neural networks that are constructed using the v layer of V visible neurons and the h layer of H hidden neurons:
As we deal with the task of supervised learning from data streams (as defined in Section 2), we need to extend this two-layer RBM architecture with the third, final z layer for class representation. It is implemented as a "onehot" encoding, meaning that only a single neuron in z may activate at a given moment (i.e., have value set to 1, while every other one has value set to 0). By 1 z we denote the vector of RBM outputs with 1 returned by z-th neuron and 0 returned by all other ones. This allows to define z, known also as the class layer or the softmax layer:
This final, class layer uses the softmax function to estimate the probabilities of activation of each neuron in z. RBM assumes no connection between units in the same layer, which holds for v, h, and z. Neurons in the visible layer v are connected with neurons in the hidden layer h, and neurons in h are connected with those in the class layer z. The weight assigned to a connection between the i-th visible neuron v i and the j-th hidden neuron h j is denoted as w ij , while the weight assigned to a connection between the j-th hidden neuron h j and the k-th class neuron z k is denoted as u jk . This allows us to define the RBM energy function:
where a i , b j , and c k are biases introduced to v, h, and z respectively. Energy formula E(·) for state [v, h, z] can be used to calculate the probability of RBM of being in this state, using the Boltzmann distribution:
where F is a partition function allowing to normalize the probability P (v, h, z) to 1. RBM assumes that its hidden neurons in h are independent and work with variables (features in the case of supervised learning) given by the visible layer v. The activation probability of the j-th given neuron h j can be calculated as follows:
where σ(·) = 1/(1 + exp(−·)) stands for a sigmoid function. The same assumption may be made for neurons in the visible layer v, when values of neurons in the hidden layer h are known. This allows us to calculate the activation probability of the i-th visible neuron as:
where one must note that given h, the activation probability of neurons in v does not depend on z. The activation probability of class layer (i.e., decision which class the object should be assigned to) is calculated using the softmax function:
where k ∈ [1, · · · , Z] and k = l.
RBM training procedure. As RBM is a neural network model, we may train it using a cost function C(·) minimization with a selected gradient descent method. RBM most commonly uses the negative log-likelihood of both external layers v and z:
By taking each independent weight w ij , we may calculate now its gradient of the cost function:
This equation allows us to calculate the cost function gradient for a single instance. However, concept drift cannot be detected by analyzing individual instances independently. If we would base our change detection on variations induced by a single new instance, we would be highly sensitive to even the smallest noise ratio. Therefore, the properties of the stream should be analyzed over a batch of most recent instances. We propose to define RBM model for learning on mini-batches of instances. For a mini-batch of n instances arriving in t time M t = x t 1 , · · · , x t n , we can rewrite the gradient from Eq. 14 using expected values:
where E data is the expected value over the current mini-batch of instances and E model is the expected value from the current state of RBM. Of course, we cannot trace directly the value of E model , therefore we must approximate it using Contrastive Divergence with k Gibbs sampling steps to reconstruct the input data (CD-k):
After processing the t-th mini-batch M t , we can update the wights in RBM using any gradient descent method as follows:
where η stands for the learning rate of the RBM neural network. The way to update the a i , b j , and c k biases, as well as weights u jk is analogous to Eq. 17 and can be expressed as:
While RBM is a generative neural network model, we can use it as an explicit drift detector. The RBM model store compressed characteristics of the distribution of data it was trained on. Therefore, by using any similarity measure between the information stored in RBM and properties of newly arrived instances, one may evaluate if there are any changes in the distribution. This allows us to use RBM as a drift detector, introducing our Restricted Boltzmann Machine for Drift Detection (RBM-DD). Our RBM-DD model uses its similarity measure for monitoring the state of the stream and the level to which the newly arrived instances differ from the previous concepts. One should notice that RBM-DD is a fully trainable drift detector, capable not only of capturing the trends in a single evaluation measure (like most of drift detectors do), but also of learning and adapting to the current state of the stream. This makes it a highly attractive approach for handling difficult and rapidly changing streams where non-trainable drift detectors tend to fail. Measuring data similarity. In order to evaluate the similarity of newly arrived instances to old concepts stored in RBM-DD, we will use the reconstruction error. It is calculated for every instance independently in an online fashion, by inputting a newly arrived d-dimensional instance S n = [x n 1 , · · · , x n d , y n ] to the v layer of RBM. Then values of neurons in v are calculated to reconstruct the feature values. Finally, class layer z is activated and used to reconstruct the class label. We can denote the reconstructed vector as:
where the reconstructed vector features and labels are taken from probabilities calculated using the hidden layer:
The h layer is taken from the conditional probability, in which the v layer is identical to the input instance:
This allows us to write the reconstruction error in a form of the mean squared error between the original and reconstructed instance:
For the purpose of a stable concept drift detector, we do not look for a change in distribution over a single instance, but in a change of distribution over the newly arriving batch of instances. Therefore, we need to calculate the average reconstruction error over the recent mini-batch of data:
Adapting reconstruction error to drift detection. In order to make the reconstruction error a practical measure for detecting the presence of concept drift, we propose to measure the evolution of this measure (i.e., its trends) over arriving mini-batches of instances. We achieve this by using the well-known sliding window technique that will move over the arriving mini-batches. Let us denote the trend of reconstruction error over time as Q r (t) and calculate it using the following equation:
The trend over time can be computed using a simple linear regression, with the terms in Eq. 28 being simply sums over time as follows:
whereT R 0 = 0,T 0 = 0,R 0 = 0, andT 2 0 = 0. We capture those statistics using a sliding window of size W . Instead of using a manually set size, which is inefficient for drifting data streams, we propose to use a self-adaptive window size (Bifet and Gavaldà, 2007) . To allow flexible learning from various sizes of mini-batches, we must consider a case where t > W . Here, we must compute the terms for the trend regression using the following equations:
The required number of instancesn t to compute the trend of Q r (t) as time t is given as follows:n
Drift detection. The above Eq. 28 allows us to compute the trends for every analyzed mini-batch of data. In order to detect the presence of drift we need to have capability of checking if the new mini-batch differs significantly from the previous one. Our RBM-DD achieves this by using Granger causality test (Sun, 2008) on trends from subsequent mini-batches of data Q r (M t ) and Q r (M t+1 ). This is a statistical test that determines whether one trend is useful in forecasting another. As we deal with non-stationary processes we perform the variation of Granger causality test based on first differences (Mahjoub et al., 2020) . Accepted hypothesis means that it is assumed that there exist Granger causality relationship between Q r (M t ) and Q r (M t+1 ), which means there is no concept drift. If the hypothesis is rejected, RBM-DD signals the presence of concept drift.
The previous section introduced our RBM-DD -a drift detection method based on Restricted Boltzmann Machine. While this novel trainable drift detector may offer a significant drift detection capabilities and adaptation to the current state of the data stream, it offers no robustness to adversarial concept drift. In this section, we discuss how to introduce robustness into RBM-DD, leading to Robust Restricted Boltzmann Machine for Drift Detection (RRBM-DD) that is capable of handling adversarial concept drift, while still displaying sensitiveness to the emergence of valid drifts.
Robust gradient descent. The first weak point of the RBM-DD in the adversarial scenario lies in its training phase. Adversarial instances may affect the update of our trainable drift detector and thus make it less robust to poisoning attacks over time. To avoid this, we propose to create RRBM-DD by replacing the original online cost gradient calculation in RBM-DD (see Eq. 14) used to update weights (see Eq. 17) by the robust gradient descent introduced in (Holland and Ikeda, 2019). It postulates to rescale the instance values by using a soft truncation of potentially adversarial instances. It achieves this by using a class of M -estimators of location and scale. It introduces a robust truncation factorθ to control the influence of adversarial instances during the weight update:
whereθ i stands for the truncation factor for the i-th neuron in v (and thus for the i-th input feature) that is calculated as follows:
where ρ is a convex, even function and L i (y a ; z) is a loss function between true and predicted class labels (0-1 loss function is commonly used here). The authors of the robust gradient descent (Holland and Ikeda, 2019) postulate that for ρ(·) = · 2 the estimated truncation factorθ i is reduced to the sample mean of the loss function, thus alleviating the impact of extreme (in our case adversarial) instances. Therefore, they recommend to take ρ(·) = o(· 2 ) for the function argument → ±∞. The parameter s i is a scaling factor used to ensure that consistent estimates take place irrespective of the order of magnitude of the observations. It is calculated as:
where δ ∈ (0, 1) is the confidence level andσ i stands for an dispersion estimate of the instances in the mini-batch:
where χ : R → R is an even function that satisfies χ(0) < 0 and χ(·) > 0 for the function argument → ±∞. This ensures thatσ i is an adequate measure of dispersion of the loss function about a pivot point γ i = n a=1 L i (y a ; z)/n (Holland and Ikeda, 2019).
Analogously to Eq. 38, we use the robust truncation factorθ to update remaining weights and parameters of RRBM-DD given by Eq. 18-21.
Robust energy function. Another weak spot of the RBM-DD lies in its energy function (see Eq. 8). It is a crucial part for calculating the probability of RBM-DD entering a given state and is used as the basis for the RBM-DD training procedure. In our case, as we use RBM as a trainable drift detector, energy function plays a crucial role in updating the detector with new instances and adapting it to the current state of the stream. RBM-DD energy function assumes working on clean (i.e., non-adversarial) data and thus can easily be corrupted by any poisoning attacks. Therefore, we propose to improve it for our RRBM-DD to alleviate its sensitivity to corrupted instances. We achieve this by adding a gating step to the visible layer v, allowing for switching on and off neurons that may be strongly affected by noise (i.e., coming from adversarial sources). We add two new sets of variables:ṽ = [ṽ 1 , · · · ,ṽ V ] that stands for a Gaussian noise model for each neuron in the visible layer and g = [g 1 , · · · , g V ] that stands for a binary gating function for each neuron. This allows us to use gating to switch off neurons in v that have a chance probability of being affected by noisy instances. As we train our RRBM-DD over mini-batches of data, this approach will effectively switch off the RRBM-DD training procedure for every new instance that is denoted as adversarial by our underlying Gaussian noise model. The robust energy function for RRBM-DD is expressed as follows:
where the first (added) term stands for the gating interactions between v i and v i , the original energy function models the clean data, the last (added) term stands for the noise model, andb i andσ 2 i stands for mean and variance of the noise. If RRBM-DD assumes that the i-th neuron in v is corrupted by the adversarial instance (g i = 0) thenṽ i ∼ N (ṽ i |b i ;σ 2 i ).
Concept drift detectors are commonly evaluated by the prequential accuracy (Hidalgo et al., 2019) or prequential AUC/G-mean of the underlying classifier. The reasoning behind it is that the better the detection of drift offered by the evaluated algorithm, the faster and more accurate classifier adaptation becomes. However, this set-up is not sufficient for evaluating drift detectors in the adversarial concept drift setting. As we want to evaluate the robustness of a drift detector to poisoning attacks, we should attack the data stream with various levels of intensity to determine the breaking point of each algorithm. However, simple evaluation of a performance metric over varying levels of adversarial concept drift intensity does not give us information on how much our algorithm deteriorates over increasingly poisoned data. We assume that we evaluate the robustness of drift detectors in a controlled experimental environment, where we can inject a desired level of adversarial concept drift into any benchmark data stream. Let us denote by L = [l 1 , · · · , l a ] the set of adversarial poisoning levels, ordered in the ascending order l 1 < l a from the smallest to the highest level of adversarial drift injection. Following the taxonomy introduced in Section 3, we can understand those levels as:
for instance-based poisoning attacks -the percentage of instances in a mini-batch considered as adversarial in the data stream,
for concept-based poisoning attacks -the number of adversarial concepts injected into the data stream.
Inspired by works in noisy data classification (Sáez et al., 2016) , we introduce a Relative Loss of Robustness (RLR) that compares the performance of a given algorithm on a clean data stream against its performance on a data stream with l-th level of adversarial concept drift injected:
This is a popular approach used to evaluate the impact of noise on classifiers and can be directly adapted to the setting of adversarial drift detection. While it offers a convenient measure over a single level of poisoning, it becomes increasingly difficult to use when we want to evaluate the robustness of an algorithm over multiple poisoning levels. To alleviate this drawback, we propose an aggregated version of RLR measure over all considered adversarial poisoning levels:
where ω l is the importance weight associated to the performance on l-the level of adversarial information introduced to data and #L l=1 ω l = 1. The weighting part allows the end-user to adjust the measurements accordingly to the analyzed problem. If the user is interested only in the overall robustness of a given method, then all weights can be set to 1/#L. However, if it becomes crucial to select a drift detector that can perform the best even under the high intensity of attacks, the user may assign higher weights to higher levels of adversarial drift injection.
This experimental study was designed to evaluate the usefulness of the proposed RRBM-DD and answer the following research questions:
RQ1: Does RRBM-DD algorithm offers improved robustness to adversarial concept drift realized instance-based poisoning attacks?
RQ2: Does RRBM-DD algorithm offers improved robustness to adversarial concept drift realized concept-based poisoning attacks?
RQ3: Is RRBM-DD capable of preserving its robust characteristics when dealing with sparsely labeled data streams?
RQ4: What are the impacts of individual components of RRBM-DD on its robustness to adversarial concept drift? For the purpose of evaluating the proposed RRBM-DD, we selected 12 benchmark data streams, six of which were generated artificially using MOA environment (Bifet et al., 2010a) and other six being real-world data streams coming from various domains, such as security, physics, and proteomics. Such a diverse mix allowed us to evaluate the effectiveness of RRBM-DD over a plethora of scenarios. Using artificial data streams allows us to control the specific nature of drift and where it occurs, while real-world streams offer challenging problems that are characterized by a mix of different learning difficulties. Properties of used data stream benchmarks are given in Table 1 .
Here, we will present the details of the experimental study design.
Injection of adversarial concept drift. As there are no real-world benchmarks for adversarial concept drift, we will inject poisoning attacks into our 12 benchmark data streams with the following procedures:
-instance-based poisoning attacks are injected by corrupting a ratio L inst ∈ {0.05, 0.10, 0.15, 0.20, 0.25} of randomly selected instances in the stream by flipping their class labels to a randomly chosen another class.
-concept-based poisoning attacks are injected by generating a number L conc ∈ {10, 30, 50, 70, 100} of small artificial concepts of n = 250 instances using corresponding MOA data generators.
Sparsely labeled data streams. For the experiment investigating the robustness under limited access to ground truth, we investigate the 12 benchmark data streams with {5%, 10%, 15%, 20%, 25%, 30%} of labeled instances. Table 2 .
Parameter tuning. To offer a fair and thorough comparison, we perform parameter tuning for every drift detector and for every data stream benchmark. As we deal with a streaming scenario, we use self hyper-parameter tuning (Veloso et al., 2018) that is based on online Nelder & Mead optimization.
Ablation study. In order to be able to answer RQ4 we perform an ablation study to check the impact of individual introduced components on the robustness of the drift detector. We compare RRBM-DD with its simplified versions with only robust online gradient RBM-DD RG , only robust energy function RBM-DD RE , and basic RBM-DD with no explicit robustness mechanisms.
Base classifier. To ensure fairness in comparison among examined drift detectors they all use Adaptive Hoeffding Decision Tree (Bifet and Gavaldà, 2009 ) as a base classifier. Evaluation metrics. As we deal with drifting data streams, we evaluated examined algorithms using prequential accuracy (Hidalgo et al., 2019) and the proposed RLR metric (see Eq. 44). RLR assumes equal weights assigned to each level of adversarial drift injection. Windows. We used a window size W = 1000 for window-based drift detectors and calculating the prequential metrics . Statistical analysis. We used the Friedman ranking test with Bonferroni-Dunn post-hoc for determining statistical significance over multiple comparisons with significance level α = 0.05.
The first experiment was designed to evaluate the robustness of RRBM-DD and reference drift detectors to instance-based poisoning attacks. For this purpose, we injected five different ratios of poisoning attacks into 12 benchmark data streams. Figure 4 depicts the effects of varying levels of adversarial concept drift on the prequential accuracy of the underlying classifier, while Table 3 presents the RLR metric results. Additionally, Figures 5 and 6 show the visualizations of Friedman ranking test with Bonferroni-Dunn post-hoc on both used metrics.
We can see how instance-based poisoning attacks impact both drift detectors and the underlying classifier. For low attack ratios (0.05 and 0.10) we already can observe drops in performance, but all of the examined methods can still deliver acceptable performance. With the increase of poisoning attack ratios, all reference drift detectors start to fail. They cannot cope with such adversarial streams and are not able to select properly the moment for updating the Adaptive Hoeffding Tree classifier. In many cases, the performance starts to approach random decisions, which is a strong indicator of the negative effects that instance-based poisoning attacks have on detectors. This is especially visible in the case of EDDM and ECDD that are the weakest performing ones. RRBM-DD outperforms every single competitor, especially for RLR metric where it is the best algorithm over all 12 benchmarks. By analyzing Figure 4 we can see that RRBM-DD offers significantly higher robustness to increasing levels of adversarial concept drift. For not a single data stream we can observe any sharp decline in performance, even when 25% of instances in the stream are corrupted by the adversarial attacker. Such a situation can be explained by the way standard drift detectors compute the presence of a valid drift. They use statistics, such as mean values or errors, derived directly from data. This makes them highly susceptible to any adversarial attack, as even small corruption of the data being used to compute drift statistics will result in either incorrectly increased sensitivity to any variations in streams, or inhibits sensitivity to valid concept drift. RRBM-DD avoids this pitfall by being a fully trainable drift detector that uses two robustness inducing mechanisms that filter data before it is updated. This allows RRBM-DD to compute more accurate reconstruction error from mini-batches and use it to correctly react only to valid concept drift. RQ1 answer. Yes, RRBM-DD offers excellent robustness to instance-based poisoning attacks and is not significantly affected by various levels of such adversarial concept drift.
5.4 Experiment 2: Evaluating robustness to concept-based poisoning attacks Experiment 2 was designed as a follow-up to Experiment 1. Here, we want to investigate a much more challenging scenario of concept-based poisoning attacks on data streams. For this purpose, we injected five different numbers of adversarial concepts into 12 benchmark data streams. Figure 7 depicts the effects of varying levels of adversarial concept drift on the prequential accuracy of the underlying classifier, while Table 4 presents the RLR metric results. Additionally, Figures 8 and 9 show the visualizations of Friedman ranking test with Bonferroni-Dunn post-hoc on both used metrics. Experiment 2 further confirms the observations made during the analysis of experiment 1. State-of-the-art drift detectors offer no robustness to adversarial attacks and can be very easily fooled or damaged by even a very small number of poisoning attacks. What is very important to notice is the difference in the impact of concept-based poisoning attacks versus their instance-based counterparts. Here we can see the catastrophic effects of injecting adversarial concepts into the stream, as every single reference drift detector converges at a point where it behaves worse than a random guess. This can be interpreted as adversarial data hijacking the updating process of the underlying classifier and forcing it to adapt to the malicious information. RRBM-DD once again offers excellent robustness, while maintaining a very good valid drift detection -as evident from the high prequential accuracy of Adaptive Hoeffding Tree associated with it. Of course, concept-based poisoning attacks have a stronger effect on RRBM-DD, yet they are not capable of hindering its sensitivity and robustness. The first two experiments highlighted the excellent properties of RRBM-DD when dealing with adversarial concept drift, but it would be very beneficial to understand what exactly is the cause of such a performance. We will analyze this using an ablation study in experiment 4.
RQ2 answer. Yes, RRBM-DD can efficiently handle the injection of adversarial concepts, even when they fulfill smoothness and cluster assumptions. This proves that RRBM-DD is not simply insensitive to noisy data, but can handle truly adversarial scenarios with malicious party using crafted poisoning attacks on data.
The third experiment was designed to investigate the behavior of RRDM-DD under sparse access to class labels. As discussed in Sections 1 and 3 a common pitfall of many algorithms for learning from data streams lies in the unrealistic assumption that there is unlimited access to labeled instances. It is crucial to acknowledge that any algorithm for data stream mining, be it classifier or drift detector, must be flexible enough to work in scenarios where class labels are sparse. We used 12 benchmark data streams to select six different percentages of labeled instances. The label query procedure was repeated 10 times, in order to avoid impacting the results with selecting easy or difficult instances. This resulted in 60 runs for each out of 12 benchmark streams. Figures 10 and 11 present the win-tie-loss plots for comparing the performance of RRBM-DD on sparsely labeled streams under instance-based and conceptbased poisoning attacks. Tables 5 and 6 present the RLR metrics for RRDM-DD and reference methods under both types of attacks, while Figures 12 and 13 show the visualizations of the Friedman ranking test with Bonferroni-Dunn post-hoc analysis. Sparse access to class labels significantly impacts state-of-the-art drift detectors. All of them were designed for fully supervised cases and use both feature values and class labels to compute statistics used in drift detection. By instance-based poisoning attacks and sparsely labeled assumption (only 10% labeled instances) with respect to the number of wins (green), ties (yellow), and losses (red), according to a pairwise F-test with statistical significance level α = 0.05. Prequential accuracy used as a metric. 60 runs per data stream were obtained from 6 different labeling budgets, each repeated 10 times with random selection of instances to be labeled. concept-based poisoning attacks and sparsely labeled assumption with respect to the number of wins (green), ties (yellow), and losses (red), according to a pairwise F-test with statistical significance level α = 0.05. Prequential accuracy used as a metric. 60 runs per data stream were obtained from 6 different labeling budgets, each repeated 10 times with random selection of instances to be labeled. limiting the number of labeled instances they obtain, the estimators of used statistics become less and less reliable. Detectors are forced to make decisions based on a small, potentially non-representative sample and thus are much more prone to errors. This is already a very difficult problem, but becomes even more challenging when combined with the presence of adversarial concept drift. RRBM-DD, due to its trainable nature is capable of much better performance even under limited access to class labels. As we track the progress of the stream using regression-based trends, we can still compute them efficiently from a smaller sample size. Furthermore, used robust gradient was designed by its authors to work with smaller data streams (Holland and Ikeda, 2019 ).
RQ3 answer. Yes, RRBM-DD is capable of efficiently handling sparsely labeled data streams, without sacrificing its accuracy and robustness to adversarial concept drift.
The fourth and final experiment was designed in the form of ablation study.
Here, we want to switch off different components of RRBM-DD to gain understanding what is the source of its desirable performance and under what specific scenarios which component offers the most improvement to our drift detector. Tables 7 and 8 show the LRL metric performance averaged over fully and sparsely labeled data streams for four settings -the proposed RRBM-DD model, its basic version RBM-DD without any robustness enhancements (discussed in Section 4.1), RBM-DD RG using only robust gradient calculation and RBM-DD RE using only robust energy function for estimating network state. The basic RBM-DD performs only slightly better than state-of-the-art drift detectors. This shows that the excellent performance of RRBM-DD in the face of adversarial concept drift cannot be only contributed to its trainable nature or used neural model. One must notice that both gradient and energy function of RRBM-DD offer significant improvements on their own, but in specific conditions. Robust gradient offers a higher boost to robustness when dealing with instance-based poisoning attacks. This can be explained by the scaling approach used in it (see Eq. 39-41), as it filters out instances that differ significantly from the core concept of each class. This makes it very robust to instance by instance attacks, as they will not affect significantly the training procedure of RRBM-DD. On the other hand, the robust energy function (see Eq. 42) offers much better performance when dealing with concept-based poisoning attacks. This can be contributed to the noise model that is embedded in said function. It allows to model not instances but entire noisy distributions, effectively cutting out adversarial concepts (i.e., disjuncts of instances) from strongly impacting the weight update of RRBM-DD. RQ4 answer. RRBM-DD benefits from interplay between both of its robustness enhancing components. They offer diverse, yet mutually complementary functionalities and their combination makes RRDM-DD robust to various types of adversarial attacks.
6 Conclusions and future works Summary. In this paper, we have presented a novel scenario of learning from data streams under adversarial concept drift. We proposed that two types of change may be present during the stream processing. Valid concept drift represents natural changes in the underlying data characteristics and must be correctly detected in order to allow a smooth adaptation of the model. Adversarial concept drift represents a poisoning attack from a malicious party that aims at hindering or disabling the classification system. We discussed the negative impacts of adversarial drift on classifiers and proposed a taxonomy of two types of attacks: instance-based and concept-based. We examined stateof-the-art concept drift detectors and concluded that none of them is capable of handling adversarial instances. To address this challenging task we proposed a novel approach that is robust to the presence of adversarial instances: Robust Restricted Boltzmann Machine Drift Detector. We presented how this fully trainable neural model can be used for efficient tracking of trends in the stream and accurate drift recognition. We enhanced our drift detector with the improved gradient calculation method and energy function with an embedded noise model. These modifications made our model robust to adversarial concept drift, while still being sensitive to valid drifts. Finally, we have introduced Relative Loss of Robustness, a novel measure for evaluating the performance of drift detectors and other streaming algorithms under adversarial concept drift. Main conclusions. The efficacy of RRBM-DD was evaluated on the basis of an extensive experimental study. The first two experiments compared RRBM-DD with five state-of-the-art drift detectors under instance-based and conceptbased poisoning attacks. Obtained results clearly backed-up our observations that none of the existing drift detectors displays robustness to adversarial instances. RRBM-DD offered not only excellent detection rates of valid concept drifts, but also high robustness to all types and intensity levels of adversarial attacks. These characteristics were valid in both fully and sparsely labeled data streams, making RRBM-DD a highly suitable algorithm for a plethora of reallife applications. Finally, we have conducted an ablation study to understand the impact of RRBM-DD components on its robustness. Interestingly, both components were useful in specific tasks. The robust gradient algorithm was contributing most when dealing with instance-based poisoning attacks, while robust energy function offered significant gains for RRBM-DD when handling concept-based poisoning attacks.
Future works. RRBM-DD opens several directions for future research. We plan to modify its cost functions in order to tackle the issue of simultaneous adversarial concept drift and dynamic class imbalance, as well as develop deep architectures based on RRBM-DD.