2014 Anomaly Detection Optimization Workshop
2014 Anomaly Detection Optimization Workshop
OMAD 2014
Edited By
i
ii
Foreward
Anomaly Detection techniques are playing an increasingly important role in the analysis of large
data sets across many application domains. In particular, the use of anomaly detection
techniques for monitoring digital and physical infrastructure is growing rapidly, Other important
application domains include health and climate informatics. The aim of the 2014 workshop on
Optimization Methods for Anomaly Detection (OMAD) is to bring together researchers to study
the detection of anomalies in large data sets in a systematic optimization framework. The
workshop consists of four papers and two keynote addresses.
In ParitoSVR: Parallel Iterated Optimizer for Support Vector Regression in the Primal, the
authors will present a distributed algorithm for support vector regression using the ADMM
framework. The SVM model is then used to identify anomalies as those data points, which have
a large residual value vis-à-vis the model. The authors apply paritoSVR on a real (and large) data
set consisting of fuel consumption patterns in airline flights.
In Anomaly Detection Using Tripoint Arbitration Similarity Method, the author, proposes a
tripoint similarity function to identify outliers. The similarity function is used in a MinMaxCut
optimization framework. The proposed method is validated on an application related to
monitoring computing infrastructure.
The workshop will also host two keynote talks. The first by Professor Vipin Kumar from the
University of Minnesota will highlight the role of anomaly detection in getting a better
understanding of climate data. The second, by Dr. Dragos Margineantu, from Boeing, will focus
on the application of anomaly detection techniques in the airline industry.
The organizing committee would like to thank (i) the authors for participating in the workshop,
(ii) the organizers of the SDM 2014, especially Professor Tina Elliasi-Rad, the SDM workshops
chair, (iii) colleagues who served in the program committee
Finally we would like to thank the sponsors of the workshop: NASA Ames and National ICT
Australia (NICTA) for their generous support.
Thanks!
iii
Workshop Committee
Program Chairs:
Program Committee:
iv
2014 Workshop on Optimization Methods for
Anomaly Detection
OMAD 2012
Table of Contents
Foreword..………………………………………………………………………………..……...iii
Workshop Committee…………………………………………………………………………..iv
Accepted Abstracts
1. ParitoSVR: Parallel Iterated Optimizer for Support Vector Regression in the Primal.……....3
v
Understanding Global Change: Opportunities and Challenges for
Data Driven Research
Vipin Kumar
The world's population is growing steadily and many countries are simultaneously
industrializing, developments that have been ongoing at varying rates for two
centuries but have accelerated over the past several decades. These processes are
increasingly straining already scarce natural and food resources, which must scale up
to keep pace with growing demand. The consequences of such large-scale changes
include tremendous stresses on the environment that would be calamitous at the
current rate of change if they are not managed sustainably. As a result, scientists are
tasked with providing answers to challenging questions such as: What is the effect of
urbanization on regional land use and ecology? What is the impact of climate change
on global water resources? How does deforestation affect the net carbon balance?
How does increased biofuel production impact crop patterns and food availability?
Addressing these interconnected, societally-relevant questions requires development
of new computational methods that enable monitoring, analysis and understanding of
changes in the Earth system, interactions between different processes, and their
impacts on factors such as the carbon cycle, hydrology, air quality, and biodiversity.
This talk will present an overview of research being done in a large interdisciplinary
project on the development of novel data driven approaches that take advantage of the
wealth of climate and ecosystem data now available from satellite and ground-based
sensors, the observational record for atmospheric, oceanic, and terrestrial processes,
and physics-based climate model simulations. These information-rich datasets offer
huge potential for monitoring, understanding, and predicting the behavior of the
Earth's ecosystem and for advancing the science of global change. This talk will
discuss some of the challenges in analyzing such data sets and our early research
results.
1
User-in-the-loop Learning and Optimization for Anomalous Action
Detection
Dragos Margineantu
An increasing number of users collect transaction data and need scalable tools that
assist them in identifying abnormalities. This talk will present an interactive user-in-
the-loop approach based on inverse reinforcement learning and linear optimization
methods for detecting anomalies and intent in data. We implemented and tested our
algorithms on real-world GMTI and AIS sensor data.
2
ParitoSVR: Parallel Iterated Optimizer for Support Vector Regression
in the Primal
Kamalika Das∗ Kanishka Bhaduri† Nikunj Oza‡
3
pendently, and then, these solutions can be efficiently 100
ADMM Iteration 1
ADMM final
y = x β + noise
dual variable p. ADMM converges within a few itera- 0
tions when moderate precision is required. This can be −50
Centralized
responding output or target, SVR solves the following Figure 1: Models formed by node 1 on synthetic dataset
optimization problem: as the algorithm progresses.
" m
#
X
2
(2.2) min λ||w|| + `ε (w · xi + b − yi )
w,b
i=1 data and scatter-gather operations on z until they
converge to the same result.
where λ is a constant and `ε is the ε-insensitive loss
Theorem 3.1. The ADMM update rules for the linear
function defined as, `ε (r) = max(|r| − ε, 0). This is a support vector regression primal optimization are:
convex optimization problem which can be solved using Xmj ρ
2
(j) (j)
convex optimization solvers such as CVX2 . wjt+1 = min `ε wj · xi − yi +
wj − zt − utj
2
wj
i=1
2
In the next section we show how to build SVR mod-
els for very large datasets using distributed computing zt+1 = min λ kzk22 + N ρ
z − wt+1 − ut
22
z 2
via the ADMM technique. t+1 t t+1 t+1
uj = uj + wj −z
4
2 4000 4000
Average instantaneous
Average instantaneous
3500 Observed fuel consumption Observed fuel consumption
1.5
Normalized mean
fuel consumption
fuel consumption
squared error
3000
1 3000
0.5 2500
2000
0 2000
(a) Squared error for all flights (b) Outlier flight fuel consumption (c) Normal flight fuel consumption
Figure 2: Fuel flow study on CarrierX dataset. Fig. (a) shows squared error for all test flights, the 3-σ bound and
flights which cross the threshold. Fig. (b) shows the observed and predicted fuel flow of top ranked anomalous
flight. Fig. (c) shows the same for a normal flight.
Fig. 1 shows the sample dataset generated from gression in the primal. Our formulation is paralleliz-
a linear model following y = w × x + noise, where able among a number of computing nodes connected to
w is the weight of the regression model. We have a central computing node. Empirical study show that
used 2 nodes in this experiment and, for each node, our algorithm is accurate and scalable, ideal for large
chosen a different w vector so that each node sees scale deployment. As future work, we plan to develop
a different data distribution. The data of the two asynchronous version of this problem for peer-to-peer
nodes are shown in two different colors (circle and plus architectures.
markers). Also shown in the figure are the models
(straight lines) formed by node 1 at different iterations Acknowledgements
of linear ParitoSVR algorithm. The material is based upon work supported by the
ARMD seedling fund from the National Aeronautics
4.1 Anomaly detection on CarrierX dataset We and Space Administration under Prime Contract Num-
use the linear ParitoSVR algorithm to detect anomalous ber NAS2-03144 awarded to the University of Califor-
fuel consumption in a commercial aircraft. We model nia, Santa Cruz, University Affiliated Research Center.
the average fuel flow as a function of 29 different
parameters that measure system parameters such as
lateral and longitudinal acceleration, roll and pitch References
angle, air pressure, and velocity, as well as external
parameters such as wind speed and direction. We have [1] V. V. N. Vapnik, The Nature of Statistical Learning
used all 1500 flights (≈ 4.5 million training instances) for Theory. Springer-Verlag New York, Inc., 1995.
a specific tail number for a particular year for training, [2] D. Bertsekas and J. Tsitsiklis, Parallel and distributed
and tested subsequent years’ flights for predicting fuel computation: numerical methods. Upper Saddle River,
consumption. Flights for which the mean squared errors NJ, USA: Prentice-Hall, Inc., 1989.
of the predicted instantaneous fuel consumption fall [3] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eck-
outside the 3-σ boundary of the average mean squared stein, “Distributed Optimization and Statistical Learn-
ing via the Alternating Direction Method of Multipli-
error, are tagged anomalous (σ is the standard deviation
ers,” Found. and Trends in Mach. Learn., vol. 3, no. 1,
of the mean predictions). Out of approximately 1800 pp. 1–122, 2011.
flights for a test year, 14 flights were determined to
be anomalous. Figure 2(a) shows the mean squared
errors for each of the flights in blue and the 3-σ bounds
in green. The instantaneous fuel flow for the top
ranked anomalous flight among these 14 flights is shown
in Figure 2(b). The red graph depicting observed
fuel flow is significantly higher than the predicted fuel
consumption, shown in blue.
5 Conclusion
In this paper we have proposed ParitoSVR — a par-
allel iterated optimizer which solves support vector re-
5
Anomaly Detection Using Tripoint Arbitration Similarity Method
Aleksey Urmanov∗
6
2 Tripoint Similarity and Clustering Using this definition of the pairwise similarity ma-
Tripoint arbitration similarity method is based on a trix for a data set, the clustering problem can be
novel definition of similarity of data points. Consider formulated as follows. Given a set of points D =
a collection of samples x1 , x2 , . . . , xn in Rm with the {x1 , x2 , . . . , xn }, xi ∈ Rm , the problem is to par-
Euclidian distance dij = d(i, j) = d(xi , xj ) as the tition the set into an unknown number of clusters
closeness measure for two points. Given a pair of points, C1 , C2 , . . . , CL so that points in the same cluster are
(xi , xj ), and an arbiter point a ∈ Rm , the tripoint similar and points in different clusters are dissimilar.
arbitration similarity is defined as This clustering problem can be casted into an optimiza-
tion problem that can be efficiently solved using matrix
min(d(i, a), d(j, a)) − dij spectral analysis methods
(2.1) Sa (xi , xj ) =
max(min(d(i, a), d(j, a)), dij ))
(2.6) min J(C1 , C2 , . . . , CL )
Sa takes values between −1 and +1 with the
(2.7) SD (Cp , Cp ) ≥ 0, 1 ≤ p ≤ L
following interpretation. Sa (xi , xj ) = −1 means that
points xi and xj are completely dissimilar for the (2.8) SD (Cp , Cq ) ≤ 0, 1 ≤ p < q ≤ L
arbiter point a. Sa (xi , xj ) = +1 means the points
SD (Cp , Cq ) is the average of all pairwise similarities of
are completely similar. Sa (xi , xj ) = 0 means the
points from clusters Cp and Cq
arbiter point cannot decide whether the points similar or
(2.9)
dissimilar. All other non-zero values reflect the degree 1 X X
of similarity (positive values) or dissimilarity (negative SD (Cp , Cq ) = SD (xi , xj )
| Cp | | Cq |
values) of the pair for the arbiter. i:xi ∈Cp j:xj ∈Cq
For a set of arbiter points A = {a1 , a2 , . . . , al } the
similarity is aggregated over all arbiters and the objective function J is constructed to simulta-
neously satisfy min SD (Cp , Cq ) for 1 ≤ p < q ≤ L and
l max SD (Cp , Cp ) for 1 ≤ p ≤ L. One such objective
1X
(2.2) SA (xi , xj ) = Sak (xi , xj ) function is [5]
l
k=1
X SD (Cp , Cq ) SD (Cp , Cq )
Let D = {x1 , x2 , . . . , xn } be a random sample from (2.10) J= +
SD (Cp , Cp ) SD (Cq , Cq )
an unknown population. The empirical pairwise tripoint 1≤p<q≤L
arbitration similarity matrix of sample D is defined as
Dropping the constraints in (2.6) leads to the prob-
(2.3) SD = [SD\{xi ,xj } (xi , xj )] lem similar to the MinMaxCut formulation in [5] with
pairwise associations given by the tripoint similarity.
Since similarity (2.1) ranges from -1 to +1 for any To deal with the constraints in (2.6) an iterative
type of data, it is possible to combine similarities of dif- approach was adopted. At the initial iteration the orig-
ferent modalities of multimodal data into a single overall inal problem is solved by partitioning the data set into
similarity. One rule for combining modal similarities is two clusters using an appropriate objective function, for
to follow common sense (analogously to [4]). For modal example, the MinMaxCut objective function in (2.10).
similarities with the same sign, the overall similarity be- At the next iteration each of the two clusters is parti-
comes bigger than either of the modal similarities but tioned in two and so forth. At each iteration the con-
still remains ≤ 1. straints are checked. Violation of the constrains serves
(1) (1) (2) (2) as a stopping criterion for the iterations. The process of
Sa (xi , xj ) = Sa(1) (xi , xj ) + Sa(2) (xi , xj )
(2.4) splitting clusters is stopped when no more clusters can
(1) (1) (2) (2)
− Sa(1) (xi , xj ) · Sa(2) (xi , xj ) be split without violating the inter-cluster dissimilarity
constraint. This iterative procedure automatically pro-
When modal similarities have different signs, the duces the appropriate number of clusters. The tripoint
overall similarity is determined by the maximum abso- arbitration clustering method uses matrix spectral anal-
lute value but the degree of similarity or dissimilarity ysis results to iteratively find the appropriate number of
weakens. clusters by solving the problem (2.6).
(2.5)
Sa (xi , xj ) = 3 Anomaly Detection System
(1) (1) (2) (2) The proposed anomaly detection system relies on tri-
Sa(1) (xi , xj ) + Sa(2) (xi , xj ) point clusters to determine a possible global structure
(1) (1) (2) (2)
1 − min(| Sa(1) (xi , xj ) |, | Sa(2) (xi , xj ) |) in the data. Tripoint clustering finds automatically the
7
Figure 1: Outlier detection on artificial data with FAR Figure 3: Estimated sampling distribution of Sz .
< 1%. All observations that lie in the yellow region
will be detected as outliers given the nominal data that from which are considered as outliers with < 1% FAR
comprise two clusters. for the data set compose of two clusters shown with
blue crosses and green triangles. Tripoint clustering
finds automatically two clusters in the data set and
assigns cluster labels to the corresponding observations.
Any new observation z for which Sz (C1 ) > 0.5 or
Sz (C2 ) > 0.5 is a detected outlier or anomaly.
Figure 2 shows the results of clustering and anomaly
detection in time series which represent certain at-
tributes of monitored targets in a computing infrastruc-
ture. Tripoint clustering found 2 clusters in a pool of
17 targets shown on the left and right sides of the plot.
A new target (#18) when presented to the anomaly de-
tection system was correctly detected as anomalous.
And finally Figure 3 shows the estimated sampling
distribution of Sz for a multivariate Gaussian data set
Figure 2: Anomalous target detection using time series with n = 500 points. By varying n, the values of
data representing operating targets in a computing tα can be tabulated for different α for use in (3.11).
infrastructure. Target #18 is correctly detected as For more rigorous calculation of tα , the exact sampling
anomalously behaving compared to nominally behaving distribution of Sz can be determined through Monte-
targets #1-17. Carlo simulations or asymptotic distribution theory.
References
appropriate number of clusters and labels the observa-
tions with a cluster label l = 1, 2, . . . , L. The resulting [1] P.J. Rousseeuw and A. Leroy, Robust regression and
clusters C1 , C2 , . . . , CL constitutes the nominal model outlier detection. New York: Wiley (1987).
based on the sample. [2] B. Schlkopf, J.C. Platt, J. Shawe-Taylor, A.J. Smola,
An anomaly is defined as an observation z for which and R.C. Williamson, Estimating the support of a high-
all cluster-average similarities are positive or all points dimensional distribution, Neural computation, 13(7),
from clusters C1 , C2 , . . . , CL are pairwise similar on pp. 1443-1471 (2001).
average, i.e. [3] V.J. Hodge and J. Austin, A survey of outlier detec-
(3.11) tion methodologies, Artificial Intelligence Review 22.2,
1 X pp. 85-126 (2004).
Sz (Cl ) = Sz (xi , xj ) > tα , i, j : xi , xj ∈ Cl , [4] I. B. Sirodza, Quantum models and methods of artificial
| Cl | i,j
intelligence for decision-making and control, Nauch-
naya Mysl (2002), pp. 92.
where α is the desired false detection rate. The thresh- [5] C. Ding, et al., A minmaxcut spectral method for data
old tα is determined from Prob(Sz > tα ) < α . clustering and graph partitioning, Lawrence Berkeley
Figure 1 illustrates the area (in yellow color) points National Laboratory, Tech. Rep 54111 (2003).
8
Measuring Anomalousness in Statistical Models
9
can define a strict weak ordering of events by their Proof. By definition we have that
anomalousness, i.e. x >a y if and only if q(x) < Z
q(y). In particular, anomalousness can be defined as q(x) = 1{f (y) ≤ f (x)}f (y)dy
some monotonic decreasing function of the q-value, for
example − log(q(x)). X fi fix
fi
= 1 ≤ V (Bi )
It is interesting to compare this definition with V (B i ) V (B ix ) V (B i)
i
the p-value, which is always defined in terms of some X
test statistic, say T (x), of the event. In particular, = fi
the p-value is the probability of the test statistic ex- {i:di ≤d(x)}
10
with success probability p = q(x). By definition, performance metrics. Similarly, many types of network
attack amount to a small set of users doing highly un-
n
|{y ∈ Yn : f (y) ≤ f (x)}| 1X usual things at a given instant. For example, a port scan
∼ 1{A(x)}(Y )
n n i=1 attack would correspond to a client sending requests to
an unusually large range of server port addresses on
Pn a host in a relatively short period of time. For these
Furthermore, i=1 1{A(x)}(Y ) ∼ B(n, p), i.e. it is
a binomial random variable with number of trials n problems, it is not necessary to try and model the dis-
a.s. tribution on the full space. Instead, we can accurately
and probability of success p. Noting that B(n, p) −−→
N (np, np(1 − p)) as n → ∞ it follows that model its marginals, for example the individual perfor-
mance metrics, or the distribution of a population for
n
1X a.s. q(x)(1 − q(x)) particular attributes, such as unique server port address
1{A(x)}(Y ) −−→ N q(x), requests in a fixed time interval. Then compute q-values
n i=1 n
on these, and aggregate the individual q-values to get
an effective measure for overall anomalous at any given
In particular, it is normally distributed with mean q(x)
instance.
and variance q(x)(1 − q(x))/n. The variance is maximised
a.s. To understand why we must account for the number
when q(x) = 1/2, and so qn (x) −−→ q(x) as n → ∞ for
of dimensions in this aggregation process, consider the
all x and we are done.
simple case that each marginal is a Gaussian. If there
This is just a particular Monte Carlo scheme for is no anomaly, we expect N independent samples from
R
evaluating the integral 1{f (y) ≤ f (x)}f (y)dy. It has a Gaussian, where N is the number of dimensions. In
one important advantage over the other schemes we dis- the case that N = 10, 000 the most extreme sample we
cuss: the same set of samples can be used for evaluating expect to see is about 4 standard deviations, where as
q(x) for any x. This means it is particularly well suited in the case that N = 10 the most extreme sample we
to Sequential Monte Carlo methods for estimating the expect to see is around 1.5 standard deviations. These
√
statistical model. Otherwise, the following methods will correspond to q-values of 1 − erf (4/ 2) = 6.3 × 10−5 and
√
have lower error for a given running time. 1 − erf ( / 2) = 0.13, respectively.
1.5
A recursive stratified sampling, such as the MISER Given a collection of N q-values, {qi }, a heuristic
algorithm [9], will yield lower variance for the same we have found to be useful for computing an aggregate
sample size. Further speedup can be obtained by q-value is to compute the q-value on the order statistic
importance sampling. In particular, the integrand is q (N ) (x) = P ({y : fX (N ) (y) ≤ fX (N ) (x)})
identically zero where f (y) > f (x). Therefore, if
N −1
we are using
P a mixture model, with density function Here, fX (N ) (y) = 1!(NN−1)!
!
(F (y) − F (−y)) f (y) de-
f (y) = i πi fi (x) and can compute the regions {Ri }, notes the distribution of the most extreme sample as a
bounded by zi : zi = fi−1S (f (x)/πi ) , we should only function of y, from a collection of N independent identi-
sample outside the region i Ri . Finally, we note for cally distributed samples from a symmetric single mode
a mixture of uniforms approximation, then storing the distribution, and x is the value of the most extreme sam-
region densities in a red-black tree augmented with the ple. In our case, we are not interested when the smallest
fraction of items in each subtree means it is possible to q-value is too large, given the sample size. Therefore,
compute the q-value for a new item in O(log(N )) and we evaluate P ({y : |y| ≥ |x|}). This is equal to
update the data structure in O(log(N )) where N is the N
2N 1
number of uniforms, see [5] for details. [(2t − 1)]FX (x) = 1 − 1 − min{qi }
2N i
11
banking site. Every performance metric is reported at noise ratio of around 65dB; however, this was not sig-
60s intervals, although some record transactions and are nificant enough to result in user noticeable system per-
not necessarily available at this granularity. It contains formance degradation.
33,159,939 distinct records and 33,456 distinct time We generated two alerts, corresponding to these two
series. The data cover a period of 72 hours and so the incidents for this data set. Our algorithm to generate
total data rate is around 500,000 values per hour. There alerts from the raw aggregate q-values is based on both
are 38 categories of metric; these include responses per the signal-to-noise and the historical quantiles of the
interval, average response time, errors per interval, stall aggregate q-value, for which we use the data structure
counts and average result processing. Note that various proposed in [11].
categories are split out by SQL command, host and so
on, which accounts for the total number of distinct time References
series.
For this data set, we found it was sufficient to as-
sume that the series were stationary. For other prob- [1] C. C. Aggarwal, A. Hinneburg, and D. A. Keim,
lems, capturing diurnal and weekly variation is impor- On the Surprising Behavior of Distance Metrics in
tant, for which we use radial basis function interpolation High Dimensional Space, Proc. Int. Conf. on Database
to fit the periodic temporal patterns. We chose to fit Theory, (2001), pp. 420–434.
[2] V. Barnett, and T. Lewis, Outliers in Statistical Data,
either a Gaussian distribution with unknown mean and
Third Edition, John Wiley & Sons, Chichester, 2006.
precision, a gamma distribution with unknown shape
[3] C. M. Bishop, Pattern Recognition and Machine Learn-
and rate, or a log-normal distribution with unknown ing, Springer, 2006.
location and scale to the (assumed) stationary distribu- [4] M. M. Breunig, H. P. Kriegel, R. T. Ng, and J. Sander,
tion of each time series. We use standard Bayesian tech- LOF: Identifying Density-Based Local Outliers, SIG-
niques to estimate the parameters, and Bayesian model MOD00: Proc. ACM SIGMOD Int. Conf. on Manage-
selection to choose among the models, see [3] for details ment of data, (2000), pp. 93–104.
on Bayesian model selection. Finally, on this data set [5] T. H. Cormen, C. E. Leiserson, R. Rivest, and C. Stein,
we found it was very important to accurately account Introduction to Algorithms, Third Edition, The MIT
for time series comprising integer data with low vari- Press, 2009.
ation, in particular, series for which particular integer [6] M. Datar, N. Immorlica, P. Indyk, and V. S. Mirrokni,
Locality-Sensitive Hashing Scheme Based on p-Stable
values have significant probability. Such data are gen-
Distributions, Proc. ACM Symp. on Computational
erally badly modelled by continuous distributions. We Geometry, (2004), pp. 253–262.
automatically detect this case, and model these data us- [7] H. Fan, O. Zaı̈ane, A. Foss, and J. Wu, A Nonpara-
ing a latent variable. In particular, we assume that the metric Outlier Detection for Efficiently Discovering
observed values are described by X + U ([0, 1]), where Top-N Outliers from Engineering Data, Proc. Pacific-
we estimate X, and U ([0, 1]) denotes a uniform random Asia Conf. on Knowledge Discovery and Data Mining
variable on the interval [0, 1]. (PAKDD), (2006), pp. 557–566.
A large anomaly manifested itself as system perfor- [8] E. M. Knorr, and R. T. Ng, Algorithms for Mining
mance degradation during the interval 32 to 35 hours af- Distance-Based Outliers in Large Datasets, Proc. of
ter the start of the data set. In terms of the raw anomaly the 24th International Conference on Very Large Data
scores, which were obtained by aggregating individual Bases, (1998), pp. 392–403.
[9] W. H. Press, and G. R. Farrar, Recursive stratied sam-
time series q-values, this corresponded to a signal-to-
pling for multidimensional Monte Carlo integration,
noise ratio of around 330dB, where the noise level was Computers in Physics, vol. 4, (1990), pp. 190–195.
taken as the median aggregate q-value. If the time se- [10] S. Ramaswamy, R. Rastogi, and K. Shim. Efficient
ries are ordered by their q-values at that time, then 560 Algorithms for Mining Outliers from Large Data Sets,
of the 33,456 time series are significantly anomalous. Proc. ACM SIGMOD Int. Conf. on Management of
These results indicated there was an operational issue data, (2000), pp. 427–438.
with a specific component of the backend, which re- [11] N. Shrivastava, C. Buragohain, D. Agrawal, and
sulted in the response time of a subsection of the website S. Suri. Medians and Beyond: New Aggregation Tech-
(6 JSPs) having dramatically increased response times. niques for Sensor Networks, Proc. of the 2nd Int.
In addition, there was a precursor to the main anomaly, Conf. on Embedded Network Sensor Systems, (2004),
at 27 hours after the start of the data set, which pro- pp. 239–249
[12] R. E. Walpole, R. H. Myers, S. L. Myers, and K. Ye,
vided the system administrators with early warning of
Probability and Statistics for Engineers and Scientists,
the specific problem before the main failure. This was Ninth Edition, Prentice Hall, 2011.
detected in the performance metrics with a signal-to-
12
Identifying Precursors to Anomalies Using Inverse Reinforcement Learning∗
13
where the φi represent the features of the reward etc. In this paper, considering sample time series from
function. The expert value function following policy a policy as monte carlo samples, the value function is
πE at state s1 can be given by approximated as follows. For each policy πj including
the expert policy πE , a sample trajectory is used to
(2.3) V πE (s1 ) = E[R(s1 ) + γR(s2 ) + ...|π] identify the state sequences and using the reward func-
= E[α1 φ1 (s1 ) + α2 φ2 (s1 ) + .. + αd φd (s1 ) tion obtained above, the values of every state in S is
updated. This is repeated for several trajectories from
+ γα1 φ1 (s2 ) + γα2 φ2 (s2 ) + .. + γαd φd (s2 ) + ..|πE ]
the selected policy and the average returns are stored
as state values.
= E[α1 (φ1 (s1 )+γφ1 (s2 )+..)+α2 (φ2 (s1 )+γφ2 (s2 )+..)
+ ... + αd (φd (s1 ) + γφd (s2 ) + ..)|πE ] 2.3 Precursor identification The value function of
the expert policy πE obtained above can be used to
compare a non-expert behavior to identify a possible
= α1 E[(φ1 (s1 ) + γφ1 (s2 ) + ..)|πE ]+ precursor sequence. V πE can be thought of as the
+ α2 E[(φ2 (s1 ) + γφ2 (s2 ) + ..)|πE ] expert’s value function and any action that is greedy
+ ... + αd E[(φd (s1 ) + γφd (s2 ) + ..)|πE ] with respect to the expert’s value function gives the
optimal policy π∗ [2]. Let the greedy action at s be
a∗ (s) and the corresponding value be V π∗ (s). In our
= α1 λ1 + α2 λ2 + .. + αd λd problem involving time series, the time sequence and
the physics of the problem can be used to restrict the
where λi represent the feature expectations, i.e., the state space for searching optimal actions in some cases.
value function if the reward function is composed of A given test time series can be analyzed as follows.
φi (s) only. After calculating the feature expecta- Using the state sequences of the test data and the
tions knowing the state sequences, the value function obtained reward function, the state values V πtest can
can be defined as a function of the unknown α = be estimated. By comparing the V πtest with V π∗ , we
[α1 , α2 , .., αd ]T as follows. can indirectly evaluate the actions taken by the agent
d in the test trajectory. Let
X
πE
(2.4) V (α) = αi λi (2.7) ∆V = V πtest (s) − V π∗ (s)
i=1
and if ∆V ≤ 0, then it would mean that a sub-optimal
Similarly, by knowing the sequence of states (trajecto-
action has been taken by the agent executing the test
ries) for J sub-expert/non-optimal policies, the V πj (α)
policy and by comparing over the state sequence, we
can be calculated. The objective of IRL is to deter-
can identify a sequence of bad actions by the agent.
mine the coefficients αi so that V πE (α) ≥ V πj (α) for
As defined earlier, an optimal action is one that cor-
j = 1, 2, ..J. A linear programming problem can be
responds to a nominal time series while a non-optimal
solved for αi as follows
action would correspond to an anomalous sequence as
XJ defined in the IRL problem. It should however be noted
(2.5) min ζj that the test policy is evaluated just based on one time
α
j=1 series and hence not an expectation. However, the goal
is to identify the level of sub-optimality in the state se-
quences specifically executed by the test trajectory to
πj πE
V (α) − V (α) − ζj ≤ 0 identify the precursor and not for the policy in general.
(2.6) subject to ζj ≥ 0, j = 1, 2, .., J This assumption needs to be analyzed more in detail
|αi | ≤ 1, i = 1, 1, .., d and will be considered in the future. Further, if the
action space is well defined, instead of comparing the
2.2 Value Function Estimation The IRL problem value functions as above, the actions of the test agent
gives an optimal α which gives a model of the underly- can be directly compared against the optimal actions of
ing expert’s reward function. The reward function can the expert and precursors can be identified by noting
then be used to determine the expert’s value function their difference.
using a regular reinforcement learning algorithm. Any
of the methods described in [2] such as dynamic pro- 3 Application to Flight Anomalies
gramming, monte carlo or temporal difference depend- In this section, the IRL based precursor discovery al-
ing on availability of the system model, ability to sample gorithm is evaluated on flight time series data sets ob-
14
tained from a FOQA (Flight Operations Quality As- on a hold-out data set. Following section 2.1, the ∆V
surance) archive. Typical FOQA parameters consist for a given test flight is calculated. A negative value for
of both continuous and discrete (categorical) data from ∆V indicates that the given test flight performs inferior
the avionics, propulsion system, control surfaces, land- to the optimal policy π∗ and a negative rate of ∆V indi-
ing gear, the cockpit switch positions, and other critical cates a sequential inferior behavior. These two features
systems. Each flight record can have up to 500 param- are used in defining precursor candidates for the given
eters in the form of time sequences and are sampled at test flight. It should be noted that the problem in hand
1 Hz. uses FOQA data that only records the state of the flight
Flight anomalies are of significant interest within and no explicit information about the intentions/actions
the NASA System-wide Safety and Assurance Technolo- of the agent (a pilot) is available and hence we were re-
gies (SSAT) project to assess the health of large com- stricted to comparing the value functions as mentioned
mercial fleets of aircraft. In this paper, flights that in section 2.3
violated exceedance thresholds on computed air-speed Using the identified precursor sequences of a given
are considered as operational anomalies. A specific ex- test flight in terms of the states s, the FOQA historical
ceedance defined as computed air-speed above a cer- data can be used to identify the flight parameters that
tain threshold (in knots) at an altitude of 1000 feet is are abnormal. The identified precursor sequence points
considered an operationally significant high-energy ap- to a section of the flight prior to the adverse event where
proach. The goal of this study is to discover precursors interesting precursor events can be discovered. By mod-
to such high-energy approach flights [5] for use in proac- eling a nominal distribution of the FOQA parameters,
tive flight management. The data set consists of about any abnormality can be detected by comparison against
20000 nominal flights (flights that did not violate the the nominal. The identified abnormal parameters may
exceedance and considered optimal with respect to the contain information about possible factors that lead to
exceedance) and about 250 anomalous flights. the adverse event. This is algorithmically analyzed and
validated by a domain expert.
3.1 Discovery of candidate precursor sequences
The FOQA raw data consists of more than 400 parame- 4 Results and Discussion
ters recorded as time sequences during the flight. How- In this section, a high-energy approach flight is analyzed
ever, to overcome the curse of dimensionality in solving for precursors from 35 nautical miles until touchdown.
the Markov decision process in the IRL, the FOQA data Figure 1 shows the evolution of the fight in terms of
is abstracted to represent the various events happening the parameters reported by the algorithm as candidate
in a flight using a high level parameter such as the air- precursors. The blue shaded region represents the nom-
craft energy. With the given definition of an anomaly, inal distribution of that parameter (99 percentile of the
the flight data is considered as a sample from an expert non-exceedance flights) The green shaded regions of the
policy (πE ) if it doesn’t flag the exceedance or a sample figure represent the sequence of precursors (a precursor
from a non-expert policy (πj ) if it flags the exceedance. window) as identified by comparing the flight’s state
A reward function R(s) can be defined as a linear com- values to V π∗ .
bination of several Gaussian functions defined with re- It can be observed from Figure 1 that the computed
spect to the states s. It has to be noted that the state air-speed of the flight is high compared to the nominal
definition is given by s = [E D]T where E represents distribution of the non-exceedance flights indicating
the kinetic energy of the aircraft while D represents the that the test flight is indeed an example of a high-energy
distance in nautical miles to touchdown. The reward approach. Further, out of the 56 chosen parameters
function R(s) can be represented as in equation (2.2) from the FOQA list, only 11 were listed as possible
where φi could represent Gaussian functions with mean precursor parameters as these parameters were out
µi and spread σi and d represents the total number of of the nominal distribution in the precursor window.
Gaussian functions in the state space. Using the re- The algorithm also reported ground speed which is
ward function with unknown coefficients αi the value correlated with the computed air-speed, vertical speed,
function of each trajectory is calculated and the IRL stabilizer position, engine speed, flight director specified
problem is solved as in section 2.1. The optimal value speed etc. However, a close look at the discrete
of α gives a model of the underlying reward function parameters reported by the algorithm gives a clear
that when used to solve the associated MDP, results in picture of the actions responsible for the anomalies,
maximum possibility of avoiding the given exceedance. i.e., the landing gear has been deployed a little earlier
The model hyper-parameters including d, µi , σi are de- compared to nominal flights and the flaps were deployed
termined based on cross-validating the learned model very late causing the aircraft to slow down late leading
15
Figure 1: Figure showing the test flight trajectory (black curve) along with the precursor window (green region)
as identified by the IRL algorithm. The nominal distribution of the continuous parameters such as computed
air-speed, engine RPM, stabilizer position, vertical speed and ground speed are shown in blue - light blue region
represents 0 - 99 percentile while dark blue region represents 25 - 75 percentiles. The nominal distribution of
discrete variables including landing gear, flaps, auto speed control are shown by blue curve with markers indicating
the probability of the variable having a value of 1.
to the exceedance (In the discrete plots, the marked be identified for evaluation of this algorithm in future.
blue curve represents the probability that a nominal Finally, some of the underlying hypotheses/assumptions
discrete event takes a value of 1). Both these factors of the algorithm will be tested in future.
were validated by domain experts as probable precursors
to the high speed exceedance. The initial high computed References
air-speed followed by a lack of optimal action (which is
to deploy landing gear and flaps on time) in this case [1] J. B. D. Cabrera, L. Lewis, X. Qin, W. Lee, R. Pras-
can be concluded as a valid precursor for flights violating anth, B. Ravichandran, and R. Mehra, “Proactive de-
the high-speed exceedance at 1000 feet altitude. tection of distributed denial of service attacks using
mib traffic variables-a feasibility study,” in Integrated
5 Conclusions Network Management Proceedings, 2001 IEEE/IFIP
International Symposium on, 2001, pp. 609–622.
In this paper, a novel method to discover precursors to [2] R. S. Sutton and A. G. Barto, Introduction to Rein-
anomalies has been formulated using inverse reinforce- forcement Learning, 1st ed. Cambridge, MA, USA:
ment learning. It is argued that a value function of a MIT Press, 1998.
non-expert, if compared against the optimal value func- [3] A. Y. Ng and S. Russell, “Algorithms for inverse
tion of an expert, can be used to identify instances of reinforcement learning,” in in Proc. 17th International
a “bad” or sub-optimal actions/situations in time se- Conf. on Machine Learning. Morgan Kaufmann, 2000,
ries data. A high dimensional FOQA time series data pp. 663–670.
has been abstracted and used for preliminary evalua- [4] P. Abbeel and A. Y. Ng, “Apprenticeship learning
via inverse reinforcement learning,” in Proceedings of
tion of the algorithm. The results indicate that the al-
the Twenty-first International Conference on Machine
gorithm indeed finds the precursors that were validated
Learning, ser. ICML ’04. New York, NY, USA: ACM,
by a domain expert. Although the analysis on a cou- 2004, pp. 1–.
ple of flights gave us promising results, the algorithm is [5] S. Das, L. Li, A. Srivastava, and R. J. Hansman, “Com-
at infancy and requires extensive validation for which parison of algorithms for anomaly detection in flight
data sets with ground truth information about the pre- recorder data of airline operations,” in 12th AIAA Avi-
cursors and anomalies are required. Also, for precursor ation Technology, Integration, and Operations (ATIO)
identification, an appropriate performance metric will Conference. American Institute of Aeronautics and
Astronautics, 2012.
16