Uncertain distance-based outlier detection with arbitrarily shaped data objects

Enabling information systems to face anomalies in the presence of uncertainty is a compelling and challenging task. In this work the problem of unsupervised outlier detection in large collections of data objects modeled by means of arbitrary multidimensional probability density functions is considered. We present a novel definition of uncertain distance-based outlier under the attribute level uncertainty model, according to which an uncertain object is an object that always exists but its actual value is modeled by a multivariate pdf. According to this definition an uncertain object is declared to be an outlier on the basis of the expected number of its neighbors in the dataset. To the best of our knowledge this is the first work that considers the unsupervised outlier detection problem on data objects modeled by means of arbitrarily shaped multidimensional distribution functions. We present the UDBOD algorithm which efficiently detects the outliers in an input uncertain dataset by taking advantages of three optimized phases, that are parameter estimation, candidate selection, and the candidate filtering. An experimental campaign is presented, including a sensitivity analysis, a study of the effectiveness of the technique, a comparison with related algorithms, also in presence of high dimensional data, and a discussion about the behavior of our technique in real case scenarios.


Introduction
Traditional data analysis techniques deal with feature vectors having deterministic values. Thus, data uncertainty is usually ignored in the problem formulation. However, uncertainty arises in real data in many ways, since the data may contain errors or may be only partially complete (Lindley 2006). The uncertainty may result from the limitations of the equipment, indeed physical devices are often imprecise due to measurement errors. Another source of uncertainty are repeated measurements, e.g. sea surface temperature could be recorded multiple times during a day. Also, in some applications data values are continuously changing, as positions of devices or observations associated with natural phenomena, and these quantities can be represented by using an uncertain model.
Simply disregarding uncertainty may led to less accurate conclusions or even inexact ones. This has created a need for uncertain data management techniques (Aggarwal and Yu 2009) managing data records typically represented by probability distributions (Mohri 2003;Kriegel and Pfeifle 2005;Bi and Zhang 2004;Aggarwal and Yu 2008;Angiulli andFassetti 2012, 2007;Aggarwal 2014;Khan et al. 2018), In this work it is assumed that an uncertain object is an object that always exists but its actual value is uncertain and modeled by a multivariate probability density function. This notion of uncertain object has been extensively adopted in the literature and corresponds to the attribute level uncertainty model viewpoint (Green and Tannen 2006).
In particular, we deal with the problem of detecting outliers in uncertain data. An outlier is an observation that differs so much from others as to arouse suspicion that it was generated by a different mechanism (Hawkins 1980). As a major contribution, we introduce a definition of uncertain outlier representing the generalization of the classic distance-based outlier definition (Knorr et al. 2000;Ramaswamy et al. 2000;Angiulli and Pizzuti 2005;Angiulli et al. 2006) to the management of uncertain data modeled as arbitrary probability density functions. The distance-based definition is a solid one: it has been introduced in order to overcome some limitations of statistical definitions, generalizes the notion of outlier provided by several discordance tests developed in statistics, is suitable for multivariate data, and can be applied even if the distribution of the data is unknown. The contributions of the work are summarized next.
-To the best of our knowledge, this is the first unsupervised outlier detection technique working on data objects modeled by means of arbitrarily shaped multidimensional distribution functions. -We introduce a novel definition of uncertain outlier representing the generalization of the classic distance-based outlier definition (Knorr et al. 2000;Ramaswamy et al. 2000;Angiulli and Pizzuti 2005) to the management of uncertain data modeled as pdfs. -Our approach consists in declaring an object as an outlier if the probability that it has at least k close neighbors is low. Hence, it corresponds to perform a nearest neighbor density estimate on all the possible dataset outcomes. As such, its semantics is completely different from previously introduced unsupervised approaches for outlier detection on uncertain data (Aggarwal and Yu 2008;Wang et al. 2009;Jiang and Pei 2011). -We show how the decision rule associated with the here introduced definition, although difficult to compute, can be truthfully implemented. -We provide an efficient uncertain distance-based outlier detection algorithm working on any domain and with any distance function.
The rest of the paper is organized as follows. Section 2 introduces the notion of distance-based uncertain outlier. Section 3 discusses work related to the one here presented. Section 4 shows how to compute the outlier probability. Section 5 presents the outlier detection method. Section 6 illustrates experimental results. Finally, Section 7 concludes the work.

Uncertain objects
Let (D, dist) denote a metric space, where D is a set, also called domain, and dist is a metric distance on D. (e.g., D is the d-dimensional real space R d equipped with the Euclidean distance dist).
A certain object v is an element of D. An uncertain object x is a random variable having domain D with associated probability density function f x , where f x (v) denotes the density of x in v. We note that a certain object v can be regarded as an uncertain one whose associated pdf f v is δ v (u), where δ v (u) = δ(0), for u = v, and δ v (u) = 0, otherwise, with δ(u) denoting the Dirac delta function.
Given a set S = {x 1 , . . . , x N } of uncertain objects, an outcome I S of S is a set Given two uncertain objects x and y, dist(x, y) denotes the continuous random variable representing the distance between x and y.
In the following we assume that with each object x it is given a finite region SUP(x) such that P r(x ∈ SUP(x)) ≤ ω for a specific threshold ω. For example, SUP could be defined as an hyper-ball or an hyper-rectangle (e.g. the minimum bounding rectangle or MBR). If x has finite support, the threshold ω can be always set to 0. Note that under the above assumption the error involved in the calculation of the probability P r(dist(x, y) ≤ R), with x and y two uncertain objects, is the square of ω.
The minimum distance mindist (x, y) between uncertain objects x and y is defined as min{dist (u, v) : u ∈ SUP(x) and v ∈ SUP(y)}, while the maximum distance maxdist (x, y) between x and y is defined as max{dist (u, v) : u ∈ SUP(x) and v ∈ SUP(y)}.

Uncertain outliers
Given an uncertain dataset DS, D k (x, DS) (or D k (x), for short) denotes the continuous random variable representing the distance between x and its k-th nearest neighbor in DS \ {x}. Next we define the notion of outlier in an uncertain dataset. For the sake of brevity, in the sequel, we will refer to an outlier in an uncertain dataset as to an uncertain outlier.
Definition 1 Given an uncertain dataset DS, an uncertain distance-based outlier in DS according to parameters k, R and δ ∈ (0, 1) is an uncertain object x of DS such that the following relationship holds: That is to say, an uncertain distance-based outlier is a dataset object for which the probability of having k dataset objects besides itself within distance R is smaller than 1 − δ.
Let N be the number of objects in DS. In order to determine the probability D k (x), the following multi-dimensional integral has to be computed, where DS denotes the uncertain dataset DS \ {x} and I DS a generic outcome of DS (see also Section 2.1): where the function I(·) outputs 1 if the probability of its argument is 1, and 0 otherwise. According to the above formulation, deciding if an object is an uncertain distance-based outlier requires to compute an integral involving all the outcomes of the dataset.

Related work
There exist several approaches to detect outliers in the certain setting, namely statisticalbased (Davies and Gather 1993;Barnett and Lewis 1994), deviation-based (Arning et al. 1996), distance-based (Knorr et al. 2000), density-based (Breunig et al. 2000;Papadimitriou et al. 2003), reverse nearest-neighbor-based (Angiulli 2020), isolation-based (Liu et al. 2012), subspace-based (Knorr and Ng 1999;Aggarwal and Yu 2001a;, knowledge-based (Angiulli and Fassetti 2014), neural network-based (Hawkins et al. 2002), support vector machine-based (Tax and Duin 2004), and many others (Chandola et al. 2009;Aggarwal 2016). Among these approaches, distance-based outlier detection methods have been shown to be effective in various scenarios (Knorr et al. 2000;Bay and Schwabacher 2003;Ghoting et al. 2006;Tao et al. 2006;). However, none of these techniques is designed to handle uncertain data and, as far as the uncertain setting is concerned, only a few approaches have been proposed (Aggarwal and Yu 2008;Wang et al. 2009;Jiang and Pei 2011). The method described in Aggarwal and Yu (2008) is a density based approach designed for uncertain objects which aims at selecting outliers in subspaces. The idea of the method is to approximate the density of the dataset by means of kernel density estimation and then to declare an uncertain object as an outlier if there exists a subspace such that the probability that the object lies in a sufficiently dense region is negligible. Differently from our approach, in Aggarwal and Yu (2008) the density estimate does not take directly into account the form of the pdfs associated with uncertain objects, since it is performed by using equibandwidth Gaussian kernels centered in the means of the object distributions. Pdfs are then taken into account to determine the objects lying in regions of low density, where the density is computed as before mentioned. Furthermore, since the method is interested in exploring subspaces (we recall that our goal is to detect outliers in the full feature space), pdfs are always expressed as the product of d independent one-dimensional pdfs, where d is the dimension of the space, while we are able to manage arbitrarily shaped multidimensional density functions.
In Wang et al. (2009) authors present a distance-based approach to detect outliers which adopts a completely different model of uncertainty than our, that is the existential uncertainty model, according to which an uncertain object x assumes a specific value v x with a fixed probability p x and does not exist with probability 1 − p x . According to this approach, uncertain objects are not modeled by means of distribution functions, but rather are deterministic values that may either occur or not occur in an outcome of the dataset. Hence, although (Wang et al. 2009) deals with distance-based outliers, their scenario is completely different from our, and the two methods are not comparable at all.
In Jiang and Pei (2011) an uncertain object consists of a pair (l, r), where l is a tuple on a set of conditioning attributes and r is a set of tuples on a set of dependent attributes, also called instances. To each instance r j ∈ r a measure of normality is assigned, consisting in the probability of observing r j given that both r and l have been observed. The normality of an object is then obtained as the geometric mean of the normality of all its instances. Authors exploits kernel density estimation and Bayesian inference to solve their problem. Outlier instances are detected by comparing against normal ones. Outlier objects are then detected as those objects most of whose instances are abnormal. We notice that the approach presented in Jiang and Pei (2011) essentially aims at detecting the abnormal instances, that, loosely speaking, are the abnormal outcomes of the uncertain objects. Thus, the task on interest in Jiang and Pei (2011) is not comparable to that considered here. Moreover, uncertain objects are modeled in a way which is completely different from that considered here.
The work (Liu et al. 2013) describes a SVDD-based outlier detection technique on uncertain data. The approach assigns a confidence score to each example, which indicates the likelihood of an example tending normal class, and then incorporates these confidence scores into the SVDD training phase for outlier detection. Hence, the technique does not directly manage uncertain objects, but rather attempts to mitigate possible error measurements by reducing the contribution on the construction of the decision boundary of the examples with the least confidence score.

Outlier probability
In this section we show how the value of P r(D k (x) ≤ R) can be computed, for x a generic uncertain object of DS. Given a certain object v and an uncertain object y, let p y v (R) = P r(dist(v, y) ≤ R) denote the cumulative density function representing the relative likelihood for the distance between objects v and y to assume value less or equal than R, that is where B R (v) denotes the hyper-ball having radius R and centered in v.
Let v be an outcome of the uncertain object x. For k ≥ 1, the probability P r(D k (v, DS \ {x}) ≤ R) that v has at least k other dataset objects within distance R can be expressed as: that is one minus the probability that less than k dataset objects lie within distance R from v. Thus, that is to say, loosely speaking, the summation over all the outcomes v of x of the occurrence probability of v multiplied by the probability that v has at least k objects within distance R over all the outcomes of the remaining dataset objects.
The subsequent section describes the algorithm UDBOD, whose aim is to quickly detect the dataset objects for which the right hand side of (4) is smaller than the provided probability threshold 1 − δ. Next it is discussed how to compute p y v (R).

Computing the probability p y v (R )
Probability values p y v (R) depend on the objects v and y, and on the real value R and involve the computation of one integral with domain of integration D (more precisely, the hyperball B R (v)). It is known (Lepage 1978) that given a function g, if m points w 1 , w 2 , . . ., w m are randomly selected according to a given pdf f , then the following approximation holds: Thus, in order to compute the value p y v (R) reported in (2), the function g y v (u) such that g y v (u) = f y (u) if dist(v, u) ≤ R, and g y v (u) = 0 otherwise, can be integrated by evaluating the formula in (5) with m points w i randomly selected according to the pdf f y . This procedure reduces to computing the relative number of sample points w i lying at distance not greater than R from v, that is

Uncertain distance-based outlier detector
In this section we describe the algorithm UDBOD (for Uncertain Distance-Based Outlier Detector) that mines the distance-based outliers in an uncertain dataset DS consisting of N objects. Definition 1 makes use of three parameters, that are k (or, equivalently, ∈ (0, 1), by setting k = N), R, and δ. We point out that these parameters can be held fixed to the default values in order to perform a meaningful analysis, as experimental results show that outlier detection is little sensitive to the values of user-specific parameters. Specifically, according to the statistical and distance-based outlier detection literature (Knorr et al. 2000;, meaningful values for the parameter are in the range (0, 2‰] (the value 1‰ is employed by default), while δ being a threshold level can be conveniently set in the range [0.8, 0.9] (the value 0.9 is employed by default). As for the value of the parameter R, it will be automatically determined by UDBOD once the percentage α of outliers to detect has been specified. The value α is much more easy to determine than R and can be conveniently set to the 3‰ .
Other than the above external parameters, the method requires some internal parameters, described in the sequel of the section, that do not require to be set by the user, since their optimal values are automatically determined from the external ones. Table 1 summarizes some of the symbols employed in this section, and meaningful ranges and recommended values for the parameters. The pseudo-code of UDBOD is reported in Algorithm 1. It consists of three phases: parameter estimation, candidate selection, and candidate filtering.

Parameter estimation phase
The Parameter estimation phase determines the right value R * for the outlier radius R as a function of and α. Note that the effectiveness of the uncertain distance-based definition relies on the right selection of the radius value. Setting a meaningful value for the parameter R is a difficult task since its right value heavily depends on the characteristics of the input data. In particular, we will map the problem of setting R to the problem of setting a parameter β ∈ [0, 1], by means of which the expected fraction of outliers can be controlled in a very simple and meaningful way. Indeed, as made clearer next, for β = 0 (β = 1, resp.) we have the statistical guarantee that a subset (superset, resp.) of the actual outliers is retrieved. In order to provide the above statistical guarantees, the meaningfulness of the outlier radius is related to the number of outliers estimated by means of a sampling procedure. The following definition is preliminarily needed.
Definition 2 Given two uncertain objects x and y, and a value β ∈ [0, 1], also called mass factor, let dist β (x, y) denote the distance value: Note that for β = 1 the distance dist β (x, y) coincides with maxdist (x, y) and that for Let α denote the percentage of outliers to be detected. Then, once the parameter k = N has been fixed, the value R * for the parameter R such that the α percent of the dataset objects has less than k objects at distance dist β less than R * can be estimated by means of the method reported in Algorithm 2.
In order the above method to be effective, a meaningful value for the sample size s must be employed. Now, it is shown how to set the size s of the sample in order to have a statistical guarantee that the actual percentage α of objects in the whole dataset DS having D β k greater than the R * is close to α.
With this aim, the following relation must hold asserting that the probability that the estimation error, that is the difference between α and α, is lower than an error threshold , is greater than 1 − λ. Clear enough, the lower and λ, the closer α to α. By the Central Limit theorem, if the sample size s is large enough, then the following relationship holds: Hence, the relation in (7) is satisfied if For example, let α = 3‰, and let = 2‰ and λ = 0.2, so that the number of uncertain outliers is between the 1‰ and the 5‰ with probability 0.8. By using (8) the sample size is s = 1,228. Now, we prove that the radius R * returned by the Parameter estimation phase is meaningful for the Definition 1. First, some properties of D β k are introduced.
Property 1 Let x be an uncertain object for which D 1 k (x) is less or equal than R. Then x is not an outlier.
Indeed, if the condition of the statement is true, then each outcome of x has at least k neighbors within radius R in every outcome of the dataset.

Property 2 Let x be an uncertain object for which
Indeed, if the condition of the statement is true, then each outcome of x has less than k neighbors within radius R in every outcome of the dataset. Thus, given radius R , it follows from Proposition 1 that the uncertain objects x of DS satisfying D 1 k (x) > R are a superset of the outliers in DS for R = R . Moreover, it follows from Proposition 2 that the uncertain objects x of DS satisfying D 0 k (x) > R are a subset of the outliers in DS for R = R .
Theorem 1 Let R 1 (R 0 , resp.) be the smallest radius such exactly αN dataset objects x satisfy the condition D 1 k (x) > R 1 (D 0 k (x) > R 0 , resp.), and let n 1 (n 0 , resp.) the actual number of uncertain distance-based outliers in DS for R = R 1 (R = R 0 , resp.). Then, the expected number n = αN of outliers in DS is lower bounded by n 1 (upper bounded by n 0 , resp.), that is n 1 ≤ n ≤ n 0 .
Proof As already pointed out, the αN objects x satisfying condition D 1 k (x) > R 1 are a superset of the actual number n 1 of outliers for R = R 1 and, consequently, n 1 ≤ αN = n. Moreover, the αN objects x satisfying condition D 0 k (x) > R 0 are a subset of the actual number n 0 of outliers for R = R 0 and, consequently, n 0 ≥ αN = n.
This makes clear the motivation underlying the introduction of the parameter β: by properly tuning the value of β the actual number of outliers (and also of candidate outliers; see in the following) can be controlled in a very simple way. As for the value to assign to β, in the section devoted to experimental results it will be shown that β = 0.5 is a good option. If at the expected outlier level α there is not a clear separation between the radius associated with outliers and that associated with inliers, then it can be concluded that there are less than αN true outliers in the dataset. So, in this case the fraction α should be lowered, for otherwise a considerable fraction of dataset objects would be recognized as outliers. This can be accomplished by properly lowering the radius R * . In particular, Algorithm 2 guarantees that the computed radius R * is at least four standard deviations far apart from the mean of the distribution of distances between sampled objects and their s -th nearest neighbor in the sample. Specifically, this estimation correction selects the smallest radius associated with objects in the sample which is not smaller than the above mentioned threshold.

Candidate selection phase
The Candidate selection phase fast determines the set OutCands of candidate outliers by exploiting a deterministic lower bound property based on the maxdist distance between uncertain objects. We start by recalling the definition of a distance-based outlier in the context of certain datasets (Knorr et al. 2000).
Definition 3 Given a dataset of objects on which is defined a distance dist, a positive integer k and a positive real number R, an object v is said to be a (certain) distance-based outlier according to parameters k and R, if less than k objects of DS lie within distance R from v.
The following result bridges the link between certain and uncertain distance-based outliers.
Theorem 2 For each δ, if x is an uncertain distance-based outliers of DS according to parameters k, R and δ then x is a certain distance-based outlier of DS for the distance maxdist according to parameters k and R.
Proof We prove that if x is not a certain distance-based outliers of DS then x is not an uncertain distance-based outlier of DS. First, we notice that x is not a certain distance-based outlier according to parameters k and R if and only if the distance to its k-th nearest neighbor is smaller than R. Moreover, we recall that D 1 k (x) denotes the distance from x and its k-th nearest neighbor according to the distance maxdist. The proof follows by Property 1.
From the above theorem a suitable set OutCands of uncertain candidate outliers can be obtained by regarding DS as a set of certain objects equipped with the certain distance maxdist and by computing the certain distance-based outliers therein contained.
As an important property, next it is shown that if the employed distance function dist is a metric, then the maximum distance function maxdist induced on dist is a metric as well.
Theorem 3 Let dist be a metric. Then the maxdist function induced by the distance dist is a metric.
Proof Four properties have to be proven: non-negativity, symmetry, identity of indiscernibles, and triangle inequality. The first two properties immediately follows from the fact that dist is a metric.
As for the identity of indiscernibles, assume that maxdist (x, y) = 0, then it is the case that for each realization u of x and v of y such that P r[ x = u ∧ y = v] > 0, dist(u, v) = 0. Hence, by the fact that dist is a metric, u = v, and x and y must be the same uncertain object. As for the reverse direction, since x and y are the same random variable, u and v are always identical.
Thus, even if the space obtained by using maxdist as a distance function is not Euclidean, it is anyway a metric one provided that dist is itself a metric (as it is the case when dist is the Euclidean distance). The above result has the important practical implication that the set OutCands can be determined by exploiting certain distance-based outlier detection algorithms designed to work in general metric spaces.
As a consequence, in step 2 the algorithm UDBOD employs the DOLPHIN technique . DOLPHIN performs two sequential scans of the dataset. During the first scan, a superset of the true outliers is detected. by accumulating in a data structure, called INDEX, the incoming objects that cannot be recognized as outliers by exploiting the objects already stored in INDEX. The second scan is needed to recognize the true outliers in INDEX. The temporal cost is derived by proving that the size of INDEX is O( k p ).

Candidate filtering phase
The Candidate filtering phase (see steps 3-9 in Algorithm 1) computes the set Outliers of uncertain outliers contained in the dataset by processing the objects in the set OutCands. In order to reduce the computational effort, a lower bound property is introduced and exploited, which avoids to consider all the potential neighbors of the candidate outliers in order to compute their outlier probability.
The objects x of OutCands such that D 0 k (x) > R can be safely inserted into Outliers since, as stated in Section 2, they are outliers for sure. We call these objects ready outliers.
As for the non-ready outliers x, it has to be decided whether P r(D k (x) ≤ R) ≤ 1 − δ or not, and this is accomplished by computing (4) exploiting the procedure explained in the following of this section and reported in Algorithm 3 (see lines 6-26). With this aim, consider the set DS x,R = {y ∈ DS | mindist (x, y) ≤ R}, also called the neighbor list of x (in DS w.r.t. R).
The objects in the set DS x,R are all and only the uncertain objects of DS which give a contribution to the probability P r(D k (x) ≤ R), since for the objects z ∈ DS \ DS x,R it holds that P r(dist(x, z) ≤ R) = 0.
Let w 1 , . . . , w m denote m outcomes of x, and let y 1 , . . . , y denote the uncertain objects in the set DS x,R ordered accordingly to an arbitrary criterion.
Let P (w h , i, j) denote the probability that the certain object w h has exactly i neighbors among the first j uncertain objects y 1 , . . . , y j of DS x,R Moreover, let P j k (x) denote the probability that x has at least k neighbors within distance R among the first j uncertain objects of DS x,R , then by exploiting the approximation in (5): The following theorem holds.

Theorem 4
If there exists j ≤ k such that P j k (x) > 1 − δ then x is not an outlier.
Proof The proof follows by noticing that, for each j ∈ {1, 2, . . . , |DS x,R |}, it holds that P j k (x) ≤ P r(D k (x) ≤ R), that is to say that P j k (x) is a lower bound for the probability that x has exactly i neighbors in a generic outcome of DS.
Consequently, if for some j ≤ k the left hand side term above exceeds 1 − δ, then the computation can be early stopped reporting that x is not an outlier.
Notice that P k (x) is precisely P r(D k (x) ≤ R). Interestingly, in order to compute P k (x) and its lower bounds P j k (x) (1 ≤ j ≤ ) only space O(mk) is needed instead of O(mk ), since the mk terms P (w h , i, j) can be computed by means of the incremental procedure described next. Let p j be P r(dist(w h , y j ) ≤ R), then the following relationship is satisfied: that is to say, the probability that the certain object w h has exactly i neighbors among the first j uncertain objects y 1 , . . . , y j is equal to (i) the probability p j that y j is a neighbor of w h and w h has exactly i − 1 neighbors among the uncertain objects y 1 , . . . , y j −1 , plus (ii) the probability 1 − p j that y j is not a neighbor of w h and w h has exactly i neighbors among the uncertain objects y 1 , . . . , y j −1 . By the above relationship it is clear that in order to compute the terms P (w h , ·, j) only the terms P (w h , ·, j − 1) are needed, that are k terms for each of the m outcomes w h of x.
The Candidate Filtering Phase, reported in Algorithm 3, details the procedure to compute the lower bound P j k (x) (there, the variable LB is used to accumulate the value of the lower bound, while the matrix elements P [h, i] to store the values P (w h , i, ·)).
The above procedure does not depend on the order y 1 , . . . , y of the objects in DS x,R , but considering first the objects closest to x may help to accelerate convergence of the lower bound. With this aim, uncertain objects in the set DS x,R are sorted in ascending order of their score s(y j ) defined as: for maxdist (x, y j ) > R, and s(y j ) = 0 for maxdist (x, y j ) ≤ R. The score s(y j ) ranges in [0, 1].

Temporal cost
Let d denote the cost of computing the distance dist between two certain objects of D and also the distances maxdist and mindist between two uncertain objects of D. Let c denote the number of outlier candidates, let m denote the number of samples employed to evaluate integrals by means of the formula in (6), and let denote the mean number of elements in the neighbor lists DS x,R employed to compute the outlier probability, for x a candidate outlier. The parameter selection phase costs O(s 2 d), where s N is the size of the sample employed to estimate R * , size that can be considered fixed. The candidate selection phase costs O( k p Nd), where p ∈ (0, 1] is an intrinsic parameter of the dataset at hand (Angiulli and Fassetti 2009). As for the candidate filtering phase, for each outcome w h of x (1 ≤ h ≤ m) and for each y j ∈ DS x,R (1 ≤ j ≤ ), computing P r(dist(w h , y j ) ≤ R), with y j ∈ DS v , costs O(md), while obtaining the terms P (w h , ·, j) costs O(k). Thus, deciding for P r(D k (x) ≤ R) ≤ 1 − δ costs in the worst case O( m(md + k)). As a whole, the candidate filtering phase costs O(c m(md + k)).
Thus, the cost of the algorithm is O s 2 d + k p Nd + c m(md + k) . The last phase of the algorithm is the potentially heaviest one, since it involves integral calculations. To be practical, the algorithm must be able to select a number of outlier candidates c close to the value αN of expected outliers (α ∈ [0, 1]) and possibly to keep as lower as possible the value of .

Experimental results
In this section, we describe experimental results carried out by using the UDBOD algorithm. If not otherwise stated, we use the default values for parameters in Table 1 and m = 1,000. The experiments are conducted on a Intel Xeon 2.33 GHz based machine with 4GB of RAM under the GNU/Linux operating system. Each dataset is characterized by a parameter γ , called spread, used to set the degree of uncertainty associated with dataset objects.
Experiments are organized as follows. Section 6.1 studies the scalability of the method. Section 6.2 studies how parameters influence the number of candidate and ready outliers. Section 6.3 compares the proposed method with related literature. Finally, Section 6.4 presents two cases of study.

Scalability analysis
We considered a family of synthetic data whose elements differ for the number N of uncertain objects and the number D of attributes, generated according to the following strategy. The uncertain objects in each dataset form two normally distributed separated clusters with mean (−10, 0, . . . , 0) and (10, 0, . . . , 0), respectively. Moreover, the 3‰ of the dataset objects are uniformly distributed in a region lying on the hyper-plane x = 0 (that is to say, their first coordinate is always zero). Uncertain objects are randomly generated and may use a normal, an exponential or a uniform distribution whose spread is related to the standard deviation of the overall data by means of the parameter γ ∈ {0.02, 0.05, 0.1}. Figure 1 on the left shows the scalability with respect to the number N of objects. In this experiment, N has been varied between 10,000 and 1,000,000, while the number of dimensions D has been held fixed to 3. These curves show that the method has very good performances for different values of spread. In particular, the execution time is below 1,000 seconds even for one million of objects, confirming that the method is able to manage large datasets. Figure 1 on the right shows the scalability with respect to the number of dimensions D. This time the number of objects has been held fixed to 10,000. Also in this case, time performances are good. The execution time clearly increases with the dimensionality, due to the increasing cost of evaluating outcomes of the distributions, but in these experiments it remained below 100 seconds even for 10-dimensional datasets.  We studied also the accuracy. Figure 2 reports the F-score as a function of the radius R. It is assumed that the outliers are the objects lying on the hyperplane x = 0. The curves highlight the accuracy of the approach. Indeed, for values of radius above 1.5 the F-score is close to 1 for every considered spread, and for spread equal to 0.02 and 0.05 the F-score is almost always above 0.9 for every radii considered.
For the highest spread and the lowest radius considered, the F-score lowers. This situation can be understood by considering Table 2 which reports the number of outliers returned by the method. It can be seen that for spread equal to 0.1 and radius set to 1.0, the number of outliers returned by the method is notably larger than the actual number of outliers. All the objects lying on the hyperplane x = 0 are correctly retrieved, but the method start to consider as outliers the objects lying in the tails of the distributions associated with the clusters.

Sensitivity analysis
In this section, we study how parameters influence performances, that is the number of candidate outliers and of ready outliers. We employed the following datasets: Cities For all datasets, a family of uncertain datasets has been obtained as follows. An uncertain object x i has been associated with each certain object v i in the original dataset, whose pdf f x i (u) is a multidimensional normal, uniform or exponential randomly selected distribution centered in x i and whose spread is related to the standard deviation of the overall data by means of the parameter γ . Different values for the parameter β and for the spread γ (specifically, γ ∈ {0.05, 0.1}) have been taken into account. Figure 3 reports the number of candidate outliers detected at the end of the candidate selection phase (gray bar, on the left), the actual number of outliers detected (green bar, on the middle), and the number of non-ready candidates (red bar, on the right). Specifically, the non-ready candidates are the objects for which (4) has to be evaluated. Notice that in almost all of the runs the number of candidate objects represents a small fraction of the overall dataset size, in the worst case amounting to the 0.65% (when γ = 0.05) and the 1.67% (when γ = 0.10) for Cities, the 0.32% for Household, the 0.38% (when γ = 0.05) and the 0.45% (when γ = 0.10) for Cities, and the 1.21% (when γ = 0.05) and the 5.97% (when γ = 0.10) for Cities. This confirms that the candidate selection phase allows to save a vast amount of time.
The dashed line represents the number αN, with α = 3‰. From the figure it is clear the effect of the parameter β on the efficiency of the method (number of candidates) and on the number of actual outliers. It appears there is a trade-off between these two numbers that can be controlled by means of β. As far as the correspondence between the number of actual outliers and the number αN of expected ones, according to Theorem 1 the number of outliers for β = 0 (β = 1, resp.) should be greater (lower, resp.) than the expected αN. Clearly, this is true modulo (i) the error introduced by the radius estimation and (ii) the introduction of the correction to the estimation. Specifically, the above relationship is satisfied for Cities, US Points and Household with γ = 0.05, and for Cities and US Points with γ = 0.10. As for the other cases, the number of actual outliers is always smaller than the expected one, since the correction of the estimation has been employed. This is also confirmed by the fact that the number of actual outliers is almost the same for the different values of β. Thus, in these cases there are less than αN true outliers and the parameter estimation phase is able to determine the right radius. Thus, the above experiment highlights that the parameter estimation phase allows to determine values for the parameters complying with the required number of outliers without exceeding the number of clearly non-outlying objects.
As for the number of candidates, it is about inversely proportional to the value of β. So, in order to reduce the computational effort it is better to employ β values greater than zero.
As for values of β close to one, the actual number of outliers could result sensibly smaller than the αN fraction, so it is better to employ β values smaller than one. Intermediate values for β (around 0.5) seem a good trade-off between the number of candidates and the number of actual outliers. Indeed, β = 0 could result in a lot of candidate outliers (e.g., for US Points and γ = 0.1 the number of candidates is more than 16 times greater than the number of outliers), while β = 1 could result in too few outliers (e.g., for Cities and γ = 0.1 the number of outliers is about nine times smaller than the expected one). Figure 4 shows the size of the neighbor list associated with rejected candidates (green bar, on the left), namely the non-ready candidates which are inliers, and number of neighbors considered until early stop is reached (red bar, on the right). The dashed line represents the value of the parameter k. The figures show that the candidate filtering phase is able to recognize the inliers without the need to take into account all the objects in the neighbor list (whose average number corresponds to the blue bars in Fig. 4). In particular, how witnessed by red bars (on the right), the number of neighbors actually considered in (9) is close to k. Notice that at least k neighbors have to be considered in order to prove the inlierness of an object. Thus the candidate filtering phase allows to maintain very low the computational effort to be paid on candidate objects. Figure 5 shows the elapsed time at the end of the parameter estimation phase (dotted line), the candidate selection phase (dashed line), and the candidate filtering phase (solid line). The plots confirm that the bulk of the computation is given by the last phase.

Comparison with other methods
We compared UDBOD with the DensitySamp technique introduced in Aggarwal and Yu (2008) and the Determistic technique introduced in Aggarwal and Yu (2001b). The technique (Aggarwal and Yu 2008) is designed for uncertain data and described in Section 3. The technique (Aggarwal and Yu 2001b) does not manage uncertainty, but determines outliers by finding projections of the data which have abnormally low density, and was already used as a baseline competitor in Aggarwal and Yu (2008). Deterministic determines outliers by finding projections of the data which have abnormally low density. In the comparison we  employed a family of datasets described in Aggarwal and Yu (2008), whose characteristics are recalled next. The data points were generated by creating Gaussian clusters in the underlying data. whose centers were generated uniformly in the unit data cube. The number of data points in each cluster was proportional to a random variable drawn from a uniform distribution in [0, 1]. The radius along each dimension was drawn from a uniform distribution in [0, r]. A fraction p of the data points were designated as outliers. The outliers were generated anywhere in the data cube. A total of N data points were generated in d dimensions. All datasets were normalized, so that the standard deviation along each dimension was 1 unit. Each uncertain attribute is normally distributed with zero mean and standard deviation drawn from a uniform distribution in [0, 2 · f ] · σ , where σ is the standard deviation of that dimension in the underlying data. The dataset is denoted by R(r). O(p).d(d).D(N).U(f ).
Since the outliers were known, the precision and recall could be measured. In the case of UDBOD, the trade-off between the precision and recall is measured by varying the radius R. As for the two other algorithms, we varied their parameters and applied Deterministic to the above datasets as described in Aggarwal and Yu (2008). Figure 6 reports the results of the comparison. According to Aggarwal and Yu (2008), we employed the following values for the parameters: r = 0.3, d = 10, p ∈ {0.1, 0.2}, N = 100K, and f ∈ {1.0, 1.5, 2.0, 2.5, 3.0}. Specifically, the two plots on the top report the Precision and the Recall of the methods for different outlier fractions, namely p = 0.1 and p = 0.2, and uncertainty level f = 1.5. As for the two plots on the bottom, the F-score obtained by the methods for the same outlier fractions p and uncertainty levels f ranging in

Cases of study
Handwritten digits. MNIST is an high-dimensional dataset of handwritten digits represented as images of 28 × 28 pixels extensively employed in the literature 3 . We simulated an uncertain scenario in which digits are blurred, by associating a normally distributed uncertain object o i with mean μ i and standard deviation σ i to each non-overlapping 2 × 2 tile of image pixels. The parameters μ i and σ i are obtained as the mean and the standard deviation of the intensities of the pixels within the corresponding tile. Thus, the dataset consists of 196-dimensional uncertain objects. We randomly selected 590 digits from the class "1" and 10 digits from the remaining classes to form a dataset of 600 uncertain objects. Figure 7 shows the dataset objects (pixels intensities are those corresponding to μ i values). Digits corresponding to the outliers have been highlighted by complementing their intensity values (so that they appear on a dark background). Outliers are computed for k = 5 and for the radius value determined by the algorithm with α = 0.02 (corresponding to about 12 objects) and β = 0.5. It can be seen that eight out of the ten non-"1" digits have been detected. The only exception is represented by a "8" digit with markedly uncertain borders and a largely distorted "9" digit. As for remaining outliers, they correspond to "1" digits that are not usual within the collection.
The number of candidates returned by the candidate selection phase was 110. This number witnesses the difficulty of the problem, since it follows from the fact that the support of the objects are largely overlapping. Despite this number, during candidate filtering the mean number of neighbors considered until early stop was only 7.4. By using m = 100, the execution time of UDBOD was about 104.4 seconds (11.7 secs for parameter estimation, 5 secs for candidate selection, and 87.7 secs for candidate filtering).
Mobile ad-hoc network data. A Mobile Ad hoc NETworks (MANET) (Bai and Helmy 2006) is a collection of wireless mobile nodes forming a self-configuring network. Applications include mobile classrooms, battlefield communication, disaster relief, and others. The mobility model of a MANET is designed to describe the movement pattern of mobile users, and how their location, velocity and acceleration change over time. A popular mobility model is the Random Waypoint model (Bettstetter et al. 2004), in which nodes move independently within a certain area, called support area. For a squared support area of size a by a, with a its diameter, centered in (x 0 , y 0 ), the pdf of the random waypoint model is provided by the following analytical expression: for x ∈ x 0 − a 2 , x 0 + a 2 and y ∈ y 0 − a 2 , y 0 + a 2 , and f rw (x, y) = 0 outside. The nodes of a MANET are typically distinguished by their limited power, processing, and memory resources. Multiple hops are usually needed for a node to exchange information with any other node and nodes take advantage of their neighbors in order to communicate with the rest of the network. A node can correctly receive packets if the signal strength of the packet at that node is above a certain threshold and the needed transmission power is inversely proportional to the squared distance separating the transmitter to the receiver.
The dataset (see Fig. 8a) consists of 250 MANET nodes distributed along three different paths joining two locations. Each red square in the figure delimits the support area associated with a node (diameters of support areas range from the 2% to 6% of the simulation area side). Since, information exchange is accomplished by multiple hops involving neighbor nodes, the smaller the number of neighbors lying in the neighborhood of a node, the less reliable, in terms of QoS (Quality of Service), the region which the node belongs to. Thus, we exploit uncertain distance-based outlier detection to determine the less reliable regions of the simulation area. With this aim, we fixed the radius R to the 7% of the simulation area side (a circular region of radius R is highlighted in 8a), a value corresponding to a predefined level of transmission power due to device constraints.
Since, the QoS can be related to the number of neighbors, we detected the uncertain distance-based outliers for increasing values of k. Figures 8c and d show the outliers for k = 3 and k = 10, respectively. The outliers for k = 3 are positioned along the central path, which corresponds to the lowest populated region of the area, while the additional outliers for k = 10 are located along the path on the right, which corresponds to the mild populated region of the area. As for remaining objects, they are located along the path on the left, which corresponds to the most reliable route between the two extrema. As for Fig. 8b, it provides a picture of the QoS associated with each location of the area, since the color of each point (colors range from blue, for k = 1, to red, for k = 35) is proportional to the smallest value of k for which the location, regarded as an uncertain object, becomes an outlier.
(a) (b) (c) (d) Fig. 8 MANET dataset: a nodes distributed along 3 paths; b QoS associated with locations (colors range from red, for higher QoS values, to blue); uncertain outliers (blue asterisks) for k = 3 c and k = 10 d

Conclusions
A novel definition of uncertain outlier has been introduced dealing with multidimensional arbitrary shaped pdfs and representing the generalization of the classic distance-based outlier definition. Our approach corresponds to perform a nearest neighbor density estimate on all the possible outcomes of the dataset and, to the best of our knowledge, has no counterpart in the literature. Possible future research directions include techniques for alleviating the cost involved with the computation of integrals, possibly based on exploiting data indexing techniques, and of alternative notions of uncertain outlier, as ones inspired to adaptive density estimation strategies, or by considering more involving scenarios including time-varying distributions.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommonshorg/licenses/by/4.0/.