-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdefense.tex
1048 lines (715 loc) · 26.4 KB
/
defense.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%undeveloped code: RNN, sys, bo
\documentclass{beamer}
%\usepackage{cite} %\bibliographystyle{IEEEtran}
\usepackage{pgfpages}
\usepackage[backend=bibtex,style=authortitle-ibid]{biblatex}
\bibliography{IEEEfull,library}
\usepackage{xcolor}
\usepackage{array} \usepackage{makecell}
\usepackage{colortbl}
%\addbibresource{library.bib}
\usetheme{metropolis} % Use metropolis theme
\title{Unsupervised Anomaly Detection in Sequences
Using Long Short Term Memory Recurrent Neural Networks}
\date{April 20, 2016} %
\author{Majid S. alDosari}
\institute{George Mason University}
%\setbeameroption{show notes}% on second screen=left}
\AtBeginSubsection{\frame{\subsectionpage}}
\input{custom}
\begin{document}
\maketitle
\begin{frame}[allowframebreaks]{Contents}
\tableofcontents
\end{frame}
\section{Introduction}
\begin{frame}{Modern technology facilitates the
capture, storage, and processing of sequential data at scale}
\begin{itemize}
\item Data capture
\begin{itemize}
\item physiological signals
\item network traffic
\item industrial processes
\item automobiles
\item website navigation
\item environment
\end{itemize}
\item Data storage
\begin{itemize}
\item Hadoop
\item MongoDB
\end{itemize}
\item Ubiquitous computing
\begin{itemize}
\item cloud/cluster
\item desktop
\item at point of capture
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{Problem: Finding anomalous data is challenging}
\begin{itemize}
\item large
\item varied
\item domain knowledge required
\end{itemize}
\end{frame}
\begin{frame}{Solution: Use recurrent neural networks to generically find anomalous data}
\begin{itemize}
\item This work:
\begin{enumerate}
\item Background: Anomaly detection in sequences
\item Sequence Modeler: Recurent neural network (RNN)
\item Experiments: RNNs for anomaly detection
\end{enumerate}
\item Prior: Malhotra \footcite{Malhotra2015} but no emphasis on process
\note{i actually had a discussion with him}
\end{itemize}
\end{frame}
\section{The Challenge of Anomaly Detection in Sequences}
\begin{frame}{Anomaly dectection work is fragmented}
\begin{itemize}
\item variety of solutions in communication networks, biology, economics, biology, ...etc.
\item different settings
\item no comparison between application domains
\item technical basis in computer science vs. statistics
\item not much review literature:
Cheboli\footcite{Cheboli2010}
and Gupta\footcite{Gupta2013}
\end{itemize}
\end{frame}
\begin{frame}{Define the problem to focus on the right solution}
Sequence $\x$
\begin{gather*}
\x=\{\x\tm{1},\x\tm{2},\x\tm{t},\ldots,\x\tm{T}\} \\
\x\tm{t} \in \mathbb{R}^v
\end{gather*}%
Assumption: Anomalies are a small part of the data.
\end{frame}
\begin{frame}{Solution must answer the following:}
\begin{enumerate}
\item
\textcolor{red}{What is normal (as an anomaly is defined as what is \textit{not} normal)?}
\item
What measure is used to indicate how anomalous point(s) are?
\item
How is the measure tested to decide if it is anomalous?
\end{enumerate}
\end{frame}
\begin{frame}[allowframebreaks]{Solution must address different anomaly types}
Simple point anomaly
\centering
\includegraphics[width=\textwidth]{figs/trivial.pdf}
\framebreak
Anomaly in a periodic context
\centering
\includegraphics[width=\textwidth]{figs/context.pdf}
\framebreak
Discord anomaly in a periodic time series
\centering
\includegraphics[width=\textwidth]{figs/discord_per.pdf}
\framebreak
Discord anomaly in an aperiodic time series
\centering
\includegraphics[width=\textwidth]{figs/discord_aper.pdf}
\framebreak
\centering
Multivariate: (a)synchronous and (a)periodic
\end{frame}
\section{Procedure}
\begin{frame}{Description of anomaly detection procedure is straightforward}
\begin{enumerate}
\item Compute an anomaly score for an observation
\item Aggregate the anomaly scores for many observations.
\item Use the anomaly scores to determine whether an observation can be considered anomalous
\end{enumerate}
\end{frame}
\begin{frame}{Characterizing normal behavior is involved}
\begin{equation*}
\x=\{\x\tm{1},\x\tm{2},\x\tm{t},\ldots,\x\tm{T}\}
\end{equation*}
\begin{enumerate}
\item Extract Samples
\item Transform Samples
\item Apply Detection Technique
\end{enumerate}
\end{frame}
\subsection{1. Sample Extraction}
\begin{frame}{Use sliding windows to obtain samples}
\begin{center}
$\mathcal{X}=\{W_1,W_2,\ldots,W_p\}$
\end{center}
\begin{itemize}
\item hop, $h$
\item window, $w$ %for localizing anom
\end{itemize}
\end{frame}
\begin{frame}{Problem: Hops can skip over anomalies}
\begin{center}
sequence: \emph{abc\underline{c}abcabc}
\begin{tabular}{|c|c|}
\hline
hop ($h$) & Ordered Windows \\
\hline
\hline
1 & \emph{abc},
\emph{bc\underline{c}},
\emph{c\underline{c}a},
\emph{cab},
\emph{abc},
\emph{bca},
\emph{cab},
\emph{abc} \\
\hline
2 & \emph{abc},
\emph{c\underline{c}a},
\emph{abc},
\emph{cab} \\
\hline
3 & \emph{abc},
\emph{cab},
\emph{cab} \\
\hline
4 & \emph{abc},
\emph{abc} \\
\hline
\end{tabular}
\end{center}
\end{frame}
\begin{frame}{Problem: Window size must be large enough to contain anomaly}
\begin{center}
sequence:
\emph{aaabbbccc\underline{c}aaabbbcccaaabbbccc}
\end{center}
Window width must be at least 4.
\end{frame}
\begin{frame}{Problem: Treating window width as a dimension size ignores temporal nature}
\begin{gather*}
\mathcal{X} =\{W_1,W_2,\ldots,W_p\} \\
W \in \mathcal{R}^{1 \times w}
\end{gather*}
\end{frame}
% \begin{frame}{Problem: Windows and hop size can't be too lage}
% \begin{center}
% sequence:
% \emph{aaabbbccc\underline{c}aaabbbcccaaabbbccc}
% \end{center}
% \end{frame}
\subsection{2. Transformation}
\begin{frame}{Transformation can help reveal anomalies}
\begin{itemize}
\item Haar transform %but only if
\item Symbolic Aggregate approXimation (SAX) \footcite{Lin2007}
\end{itemize}
\end{frame}
\begin{frame}{Transformation is not general}
\begin{itemize}
\item Choice of representation must be compatible with data characteristics %can't encode pt anom in freq
\item normal:anomaly as transform(normal):transform(anomaly)
\end{itemize}
Study \footcite{Wang2013} suggests generally little difference among representations.
\end{frame}
\subsection{3. Detection Technique}
\begin{frame}{Anomaly detection techniques and their application domains are varied}
Based on
\begin{itemize}
\item Segmentation
\item Information Theory
\item Proximity
\item Modeling
\end{itemize}
\end{frame}
\begin{frame}{Model and proximity-based techniques are most developed}
Based on
\begin{itemize}
\item Segmentation: requires homogeneous segments
\item Information Theory: requires finding sensitive information-theoretic measure
\item Proximity
\item Modeling
\end{itemize}
\end{frame}
\section{Proximity}
\begin{frame}{Idealization never occurs}
\centering
\includegraphics[height=\textheight]{figs/simple_dist.pdf}
\end{frame}
\begin{frame}{Practically, distributions are complicated}
\centering
\begin{tabular}{c|c}
\includegraphics[width=.45\textwidth]{figs/hard1_dist.pdf} &
\includegraphics[width=.45\textwidth]{figs/hard2_dist.pdf}
\end{tabular}
\end{frame}
\subsection{Effects on Point Distribution}
\begin{frame}{Distance measure should be invariant to:}
\begin{itemize}
\item length
\item translation
\item (skew)
\item (amplitude)
\end{itemize}
Study \footcite{Wang2013}: Not much difference in similarity measures
\end{frame}
\begin{frame}{Window width needs to be chosen on the scale of expected anomaly}
% so you might thing oh just make it big
If width is too large:
\begin{itemize}
\item anomalous points not distinguished
\item data becomes equidistant in high-dimensional space
\end{itemize}
\end{frame}
\begin{frame}{Sliding windows challenge anomaly detection assumptions}
\begin{itemize}
\item anomalous points are not necessarily in sparse space while repeated patterns are not necessarily in dense space \footcite{Keogh2005}
\item ``Clustering of Time Series Subsequences is Meaningless'' \footcite{Keogh2004}
\end{itemize}
\end{frame}
\subsection{Data Classification}
\begin{frame}{Global vs Local: Local techniques use neigborhood data}
\centering
\begin{tabular}{c|c}
\includegraphics[width=.45\textwidth]{figs/hard1_dist.pdf} &
\includegraphics[width=.45\textwidth]{figs/hard2_dist.pdf}
\end{tabular}
\end{frame}
\subsection{Nearest Neighbor}
\begin{frame}{Overlapping windows distort data similarity}
\begin{tabular}{lc}
\emph{abcabcXXXabcababc} &
\begin{small}
% \begin{center}
\begin{tabular}{|c||c|}
\hline
$h=1$ & $h=3$ \\
\hline
\hline
\emph{abc} & \emph{abc} \\
\emph{bca} & \\
\emph{cab} & \\
\hline
\emph{abc} & \emph{abc} \\
\emph{bcX} & \\
\emph{cXX} & \\
\hline
\emph{XXX} & \emph{XXX} \\
\emph{XXa} & \\
\emph{Xab} & \\
\hline
\emph{abc} & \emph{abc} \\
\emph{bca} & \\
\emph{cab} & \\
\hline
\emph{aba} & \emph{aba} \\
\emph{bab} & \\
\emph{abc} & \\
\hline
\end{tabular}
% \end{center}
\end{small}
\end{tabular}
\end{frame}
\begin{frame}{Solution: Use non-self matches \footcite{Keogh2005}}
\small
\centering
\begin{tabular}{|c||c|}
\hline
$h=1$ & $h=3$ \\
\hline
\hline
\emph{abc} & \emph{abc} \\
\emph{bca} & \\
\emph{cab} & \\
\hline
\emph{abc} & \emph{abc} \\
\emph{bcX} & \\
\emph{cXX} & \\
\hline
\emph{XXX} & \emph{XXX} \\
\emph{XXa} & \\
\emph{Xab} & \\
\hline
\emph{abc} & \emph{abc} \\
\emph{bca} & \\
\emph{cab} & \\
\hline
\emph{aba} & \emph{aba} \\
\emph{bab} & \\
\emph{abc} & \\
\hline
\end{tabular}
\end{frame}
\begin{frame}{kNN uses no local information}
\note[item]{if you can mitigate time series issues}
\note[item]{ hotsax k=1, go thru 2,3,*4*,5,6 .N2 different density}
\centering
\begin{tabular}{c|c}
\includegraphics[width=.45\textwidth]{figs/hard1_dist.pdf} &
\includegraphics[width=.45\textwidth]{figs/hard2_dist.pdf}
\end{tabular}
\end{frame}
\begin{frame}{Local Outlier Factor\footcite{Breunig1999} uses local density information}
A point is likely to be an anomaly if its neighbors are in dense regions while it is in a less dense region
\centering
\begin{tabular}{c|c}
\includegraphics[width=.45\textwidth]{figs/hard1_dist.pdf} &
\includegraphics[width=.45\textwidth]{figs/hard2_dist.pdf}
\end{tabular}
(Didn't you say anomalies may not be in less dense regions?!)
\end{frame}
\subsection{Clustering}
\begin{frame}{Clustering algorithms are usually not designed to find anomalies}
Assumptions: anomalous points
\begin{itemize}
\item do not belong to a cluster (DBSCAN\footcite{Ester1996})
\item are far from a cluster centroid %see the problem?
\item are in less dense clusters
\end{itemize}
\end{frame}
\section{Models}
\begin{frame}{Hidden Markov Models (HMMs) are general advanced sequence modelers}
Restrictions:
\begin{itemize}
\item fixed length sequences
\item Markovian process
\end{itemize}
\end{frame}
\section{Problems with Established Techniques}
\begin{frame}{How to determine \emph{a priori} what the best algorithm is?}
review papers only give subjective assessments
\end{frame}
\begin{frame}{Proximity-based techniques need alot of decisions}
Choose:
\begin{itemize}
\item similarity measure
\item sliding window size
\item sliding window hop
\item compatible classification technique
\end{itemize}
\end{frame}
\begin{frame}{Solution: Use a model-based technique}
\begin{itemize}
\item characterize normal %more elegant. compare with clustering/NN
\item restriction: use when data \emph{can} be modeled
\end{itemize}
Ideally:
\begin{itemize}
\item model arbitrary time series
\item minimize effect of window length
\item requires as few parameters as possible
\end{itemize}
\end{frame}
\section{Recurrent Neural Networks (RNNs)}
\begin{frame}{RNNs are powerful}
\begin{itemize}
\item speech recognition
\item handwriting recognition
\item music generation
\item text generation
\item handwriting generation
%lstm
\item translation
\item identifying non-verbal cues from speech
\item image caption generation
\item video to text description
\item generating talking heads
\end{itemize}
\end{frame}
\begin{frame}{RNNs are more flexible and efficient than HMMs}
state:
\begin{itemize}
\item HMM: hidden state depends only on previous state
\item RNN: shared state
\end{itemize}
generality:
\begin{itemize}
\item HMM: Markovian
\item RNN: general computation device
\end{itemize}
\end{frame}
\begin{frame}{Recurrence explains the efficiency of RNN encoding}
\newsavebox{\recurrent}
\savebox{\recurrent}{\includegraphics[]{figs/recurrent.pdf}}
\newsavebox{\recurrentuf}
\savebox{\recurrentuf}{\includegraphics[]{figs/recurrent_uf.pdf}}
cyclic view
\begin{center} \usebox{\recurrent} \end{center}
acyclic view
\begin{center} \usebox{\recurrentuf} \end{center}
\end{frame}
\begin{frame}{RNN computation is elaborate}
\newsavebox{\rnn}
\savebox{\rnn}{\includegraphics[]{figs/rnn.pdf}}
\newsavebox{\rnnuf}
\savebox{\rnnuf}{\includegraphics[]{figs/rnn_uf.pdf}}
\begin{tabular}{p{\wd\rnn}|p{\wd\rnnuf}}
\includegraphics[width=.7\wd\rnn]{figs/rnn.pdf} &
\includegraphics[width=.7\wd\rnnuf]{figs/rnn_uf.pdf}
\end{tabular}
\end{frame}
\begin{frame}{Training RNNs is difficult}
\begin{equation*}
L(\vc{o},\vc{y}) = \frac{1}{TV} \sum_t \sum_v(
\vc{o}\tm{t}_v - \vc{y}\tm{t}_v
)^2
\end{equation*}
\begin{itemize}
\item but mini-batch SGD-flavor training still works
\begin{equation*}
\Delta \vc{\theta} =
-\alpha
\frac{1}{|M|} \sum_{(\vc{x}_m,\vc{y}_m) \in M}
\frac{\partial{L}(
\vc{o}%(\x_m;\vc{\theta})
,\vc{y}_m)}
{\partial{\vc{\theta}}}
\end{equation*}
\item acute vanishing gradient problem
\begin{equation*}
\frac{\partial{L}\tm{t}}{\partial{\vc{W}_{ss}}} =
\sum_{i=0}^T
\frac{\partial{ L}\tm{ t}}{\partial{\vc{o}\tm{t}}}
\frac{\partial{\vc{o}}\tm{t}}{\partial{\vc{s}\tm{t}}}
\left(
\prod_{j=i+1}^{T}
\frac{\partial{\vc{s}}\tm{j}}{\partial{\vc{s}\tm{j-1}}}
\right)
\frac{\partial{\vc{s}}\tm{i}}{\partial{\vc{W}_{ss}}}
\end{equation*}
\end{itemize}
\end{frame}
\begin{frame}{Understand vanishing gradient problem through computational graph for $T=4$}
\includegraphics[width=\textwidth]{figs/grad.pdf}
\end{frame}
\begin{frame}{Long Short Term Memory (LSTM) `cells' store information but are more complicated than vanilla RNNs' $tanh$}
\includegraphics[width=\textwidth]{figs/lstm.pdf}
\footcite{Colah2015}
\end{frame}
\section{Using RNNs for Anomaly Detection}
\begin{frame}{Use same procedure for test time series to test generality}
\begin{enumerate}
\item sample
\item setup RNN autoencoder
\item train
\item optimize
\item evaluate anomaly scores
\end{enumerate}
\end{frame}
\begin{frame}{1. Sample with sliding windows of varying length to test versatility}
\begin{enumerate}
\item spikes
\item sine
\item power demand
\item electrocardiogram (ECG)
\item polysomnography ECG (PSG-ECG)
\end{enumerate}
\end{frame}
\begin{frame}{2. Setup RNN autoencoder}
\begin{itemize}
\item Set target to (uncorrupted) input
\begin{equation*}\vc{y}=\vc{x}\end{equation*}
\item Add noise to input
\begin{equation*}
\tilde{\x} = \x
+ \mathcal{N}(0,(0.75\sigma_{\mathrm{std}}(\x))^2)
\end{equation*}
\end{itemize}
\end{frame}
\begin{frame}{3a. Train: RMSprop is appropriate algorithm}
\begin{itemize}
\item works with mini-batch learning as data is highly redundant
\item similar in results to second order methods with less computational cost
\end{itemize}
\end{frame}
\begin{frame}{3b. Optimize RNN hyperparameters to find best RNN configuration}
Optimize
\begin{itemize}
\item number of layers, $l$
\item `size' of each layer, $n$
\end{itemize}
% could have kept size of each layer a var but kiss
using Bayesian optimization
\begin{itemize}
\item minimize expensive objective function calls
\item considers stochasticity of function
\end{itemize}
\end{frame}
\begin{frame}{Optimization of spike-1}
% i guess rnn is seeing val and trn as same even tough i chopped up the data into different sizes and views
% was hoping to see l=2 lower
% sometimes it gets stuck. hope not a false opt
\includegraphics[width=.5\textwidth]{figs/bo_spikelv.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_spikelv.pdf}
\end{frame}
\begin{frame}{Optimization of spike-2}
\includegraphics[width=.5\textwidth]{figs/bo_spikereg.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_spikereg.pdf}
\end{frame}
\begin{frame}{Optimization of sine}
\includegraphics[width=.5\textwidth]{figs/bo_sin.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_sin.pdf}
\end{frame}
\begin{frame}{Optimization of power}
\includegraphics[width=.5\textwidth]{figs/bo_power.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_power.pdf}
\end{frame}
\begin{frame}{Optimization of ECG}
\includegraphics[width=.5\textwidth]{figs/bo_ecg.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_ecg.pdf}
\end{frame}
\begin{frame}{Optimization of PSG-ECG}
\includegraphics[width=.5\textwidth]{figs/bo_sleep.pdf}
\includegraphics[width=.5\textwidth]{figs/trn_sleep.pdf}
\end{frame}
\begin{frame}{4. Use squared error as an anomaly score}
Reconstruction Error
\begin{itemize}
\item individual squared error
\item mean squared error of a window
\end{itemize}
\end{frame}
\begin{frame}{spike-1: atypical value detected}
\includegraphics[width=\textwidth]{figs/er_spikelv.pdf}
\note[item]{lower value more of a challenge}
\end{frame}
\begin{frame}{spike-2: irregularity detected}
\includegraphics[width=\textwidth]{figs/er_spikereg.pdf}
\end{frame}
\begin{frame}{sine: discord detection inconclusive}
%pdf not accurate
\centering
\includegraphics[height=\textheight]{figs/er_sin.pdf}
\end{frame}
\begin{frame}{power: discord detected}
\includegraphics[width=\textwidth]{figs/er_power.pdf}
\end{frame}
\begin{frame}{power: discord detected}
\includegraphics[width=\textwidth]{figs/er_power.pdf}
\end{frame}
\begin{frame}{ECG: discord detected}
\includegraphics[height=\textheight]{figs/er_ecg.pdf}
\end{frame}
\begin{frame}{PSG-ECG: discord detected}
\includegraphics[width=\textwidth]{figs/er_sleep.pdf}
\end{frame}
\begin{frame}{Experiment conclusion: squared reconstruction error of AE-RNNs can be used to detect anomalies}
\begin{itemize}
\item point errors may find extreme values
\item windowed errors find anomalies if size is on the order of anomaly
\item RNNs were insensitive to translation and length
\item RNNs learned normal \emph{behaviour} despite having some anomalies in the training data
\item the same process found anomalies in all tests
\end{itemize}
\end{frame}
\section{Conclusions}
\begin{frame}{RNNs have advantages over advanced techniques}
Model-based: HMMs
\begin{itemize}
\item more efficient encoding
\item varying sequence length
\end{itemize}
Proximity-based: HOT SAX
\begin{itemize}
\item more efficient \emph{after training}
\item multivariate
\item not forced to find an anomaly
\end{itemize}
\end{frame}
\begin{frame}{Alternative method checklist}
\begin{itemize}
\item Is only the test sequence needed to determine how anomalous it is? (Is a summary of the data stored?)
\item Is it robust against some window length?
\item Is it invariant to translation? (Is it invariant to sliding a window?)
\item Is it fundamentally a sequence modeler?
\item Can it handle multivariate sequences?
\item Can the model prediction be associated with a probability?
\item Can it work with unlabeled data? If not, is it robust to anomalous training data?
\item Does it require domain knowledge?
\end{itemize}
\end{frame}
\begin{frame}{Main disadvantage of RNNs: computational cost}
\begin{itemize}
\item training
\item hyperoptimization
\end{itemize}
\end{frame}
\begin{frame}{Further work is needed to strengthen the case for using RNNs for anomaly detection}
\begin{itemize}
\item better optimize
\item use autocorrelation to determine minimum window length
\item accelerate training: normalization, optimium training data size
\item use drop out to guard against overfitting
\item experiment with RNN architectures: bi-directional RNNs, LSTM alts., more connections
\item incorporate uncertainty
\item objective comparisons with labelled data
\item try multivariate series
\end{itemize}
\end{frame}
\begin{frame}{Conclusion}
Use RNNs to find anomalies when computational cost can be managed.
\end{frame}
\section{Reproducibility}
\begin{frame}{Technology stack enables automation and reproducibility}
\newcolumntype{T}{!{\color{blue} \vrule width 4\arrayrulewidth}}
\newcolumntype{C}[0]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{1.3in}}
\centering
\begin{tabular}{l C C}
\Xhline{6\arrayrulewidth}
application
& \multicolumn{1}{TcT}{\cellcolor{blue!10}\ldots}
& \multicolumn{1}{TcT}{\cellcolor{blue!10}\ldots}
\\
\hline
container network
& \multicolumn{2}{TcT}{\cellcolor{blue!10}\textsf{Weave}}
\\
app. containerization
& \multicolumn{2}{TcT}{\cellcolor{blue!10}\textsf{Docker}}
\\
\hline
operating system
& \multicolumn{2}{TcT}{\cellcolor{blue!10}\textsf{CoreOS}}
\\
\hline
machine
& \multicolumn{1}{TcT}{\cellcolor{blue!10}(x64)}
& \multicolumn{1}{TcT}{\cellcolor{blue!10}x64}