SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
1
Building Anomaly
Detection For Large
Scale Analytics
Ira Cohen, Chief Data Scientist
16th May, 2016
2
Outline
Anomaly detection? Why do I need it?
Design principals for Anomaly Detection
What is anomaly detection?
Anomaly Detection Methods
The Anodot System
3
Why Anomaly Detection?
4
Detecting the Unknowns  Saves Time + Money
Industrial IoT
Proactive Maintenance
Detecting issues in factories/machines
Web Services
Detecting business incidents + unknown
business opportunities
Machine Learning
Closing the “Machine Learning” loop
Tracking and detecting ”unknowns” not modeled
during training
Security
Detection of unknown breach/attack
patterns
5
Business Incidents - More go undetected as the business grows
$$$$
$$
$
$$
6
Detecting Business Incidents: Metric Driven Detection
Business
Business Generation:
Leads, visitors, usage,
engagements
App: Performance,
errors, usability
Infra utilization/state:
Middleware, network, System
e.g., Purchases per product,
Conversions per campaign…
Per Geo, user segment, page,
browser, device…
Per class, method, feature…
Per host, database, switch…
7
Detecting Business Incidents: Metric Driven Detection
Drop in # of visitors
Decrease in ad conversion on Android
Price glitch – increase in
purchases / decrease in revenue
8
Setting alerts with thresholdsDashboards
Manual Detection of Business incidents
9
Manual Solutions: Drowning in a “Sea of Data”
MISSED
INCIDENTS
FALSE
ALARMS
GENUINE
ALERTS
Too many
parameters
to set thresholds
Too much data
to analyze in
real time
10
What is Anomaly Detection?
11
Find the Anomaly
12
Anomaly Detection
12
• Ill posed problem
• What is an anomaly?
13
Anomaly Detection in Time Series Signals
Unexpected change of temporal pattern of one or more
time series signals.
14
Anomaly detection: Design Principals
15
Anomaly Detection: Design Considerations
Timeliness
Real time vs.
Retroactive Detection
Scale
100’s vs. Millions
of metrics
Rate of change
Adaptive vs. Offline
learning
Conciseness
Univariate vs.
Multivariate methods
Well defined incidents?
Supervised vs.
Unsupervised methods
16
Timeliness: Real time vs. Retroactive Detection
Real time decision making Non-real time decision making
Reduction in
visitors/revenues
Check
for bugs
Increase in product
purchase
Increase
inventory
Increase in ad conversion
w/o increase in
impressions
check for
fraud
Capacity Planning
Marketing budget allocations
Data Cleaning
Scheduled Maintenance
17
Timeliness: Real time vs. Retroactive Detection
Real time decision making Non-real time decision making
Online learning: Cannot iterate over
the data
More prone to False
Positives
Scales more easily
Batch learning: can iterate over the
data
Easier to remove False
Positives
Poor scaling
18
Rate of change
Constant change Very slow change
• Most common case
• ”Closed” systems – e.g., airplanes,
large machinery
• Requires adaptive algorithms
• Learn once and apply the model for
a long time
19
Conciseness of Anomalies
Univariate Anomaly Detection Multivariate Anomaly Detection
• Learn normal model for each
metric
• Anomaly detection at the metric
level
• Easier to scale
• Causes anomaly storms: Can’t
see the forest from the trees
• Easier to model many types of
behaviors
• Learn single model for all metrics
• Anomaly detection of complete
incident
• Hard to scale
• Hard to interpret the anomaly
• Often requires metric behaviour
to be homogeneous
Hybrid approach
• Learn normal model for each
metric
• Combine anomalies to single
incidents if metrics are related
• Scalable
• Can combine multiple types of
metric behaviours
20
Well defined incidents?
Yes - Supervised methods No - Unsupervised methods
• Requires a well defined set of
incidents to identify
• Learning a model to classify
samples as normal or abnormal
• Requires labeled examples of
anomalies
• Cannot detect new types of
incidents
• Learning a normal model only
• Statistical test to detect
anomalies
• Can detect any type of anomaly
known or unknown
Semi-Supervised methods
• Use few labelled examples to
improve detection of
unsupervised methods.
• Or – use unsupervised detection
for unknown cases, supervised
detection to classify already
known cases.
21
Anomaly Detection Methods
22
Unsupervised Anomaly Detection
General scheme
Step 1 Step 2 Step 3
Model the normal
behavior of the metric(s)
using a statistical model
Devise a statistical test to
determine if samples are
explained by the model.
Apply the test for each
sample. Flag as anomaly
if it does not pass the test
23
Very Simple Model
1σ1σ
2σ2σ
3σ3σ
μ
99.7%
95.4%
68%
Assume normal behavior is the
Normal distribution
Estimate the average, standard
deviation over all samples
Test: any sample |x-average|> 3*standard
deviation is abnormal
24
A single model does not fit them all!
Smooth
(stationary)
Irregular
sampling
Multi Modal Sparse
Discrete “Step”
25
Metric types distribution
Based on 50,000,000 metrics sampled from dozens of companies
Nearly constant,
2%
Discrete, 15%
Sparse, 3%
Multi Modal, 5%
Smooth, 38%
Irregular
sampling, 37%
All
Industries
26
Example: The importance of modeling seasonality
Single seasonal pattern
27
Example: The importance of modeling seasonality
Multiple seasonal patterns (“Amplitude modulation”)
28
Example: The importance of modeling seasonality
Multiple seasons – Additive signals
29
Seasonality Distribution
Season: 3 hours,
2%
Season: 12 hours,
1%
Season: 2 hours,
1%
Season: 1 hours,
1%
Season: 6 hours,
0.5%
Season: 4 hours,
0.2%
Season: 5 hours,
0.1%
Season: 24 hours,
69%
Season: Weekly,
26%
Note: Only 14% of the metrics have season
30
Example Methods to detect seasonality
Finding maximums in Auto-
correlation of signal
Computationally expensive
More robust to gaps
Finding maximum(s) in Fourier
transform of signal
Challenging to detect low
frequency seasons
Challenging to discover
multiple seasons
Sensitive to missing
data
Exhaustive search based on cost
function
Computationally expensive
Robust to gaps
Challenging to discover
multiple seasons
31
Real time detection @ scale = Online learning algorithms
1
2
3
Initialize model
For each new
sample test if
anomaly
Update model
parameters with
each new sample
32
Example Online Models/Algorithms
4
2
1
3
Simple Moving
Average
Double/Triple
exponential (Holt-
Winters)
Kalman Filters +
ARIMA and
variations
Single
exponential
forgetting
33
Example: Simple exponential forgetting (Normal distribution model)
Define alpha – forgetting factor
Compute initial average, sumOfSquares
using initial samples
For each new sample, x[t]
If |x[t]-average[t-1]|> 3* Stddev[t-1]
Flag x[t] as an anomalous sample
average[t] = alpha*x[t] + (1-alpha)*average[t-1]
sumOfSquares[t] = alpha*x^2 + (1-alpha)*sumOfSquares[t-1]
Stddev[t] = sqrt(sumOfSquares[t] – average[t]^2)
34
Update rate with online models: Avoiding pitfalls
What should be the learning rate?
Too Slow
Too Fast
35
Update rate with online models: Avoiding pitfalls
What should be the learning rate?
“Al Dente”
Auto tuning required!
36
Update rate with online models: Avoiding pitfalls
How to update a model when there is an anomaly?
Strategy A: Update as usual
Most of the
anomaly is missed
37
Update rate with online models: Avoiding pitfalls
Full anomaly
captured
How to update a model when there is an anomaly?
Strategy B: Adapt the learning rate
38
Batch models
1 2 3 4
Collect
historical
samples
Segment samples
to similarly
behaving segments
Cluster segments
according to some
similarity measure
Mark as anomalies
segments that are in
small or no clusters
39
Example Batch Anomaly Detection Methods
Multi-model distributions:
• Gaussian models
• Generalized
mixture models
One sided SVM
PCA
Clustering methods
(K-Means, DBScan, Mean-
Shift)
MOST COMMON IN USE
Hidden Markov Models
40
Anomaly detection methods - examples
NAME ADAPTIVE? REALTIME? SCALABLE?
UNI-MULTI
VARIATE
Holt-Winters Yes Yes Yes Univariate
ARIMA + Kalman Yes Yes Yes Both
HMM No Yes No Multivariate
GMM No No No Both
DBScan No No No Multivariate
K-Means No No No Multivariate
41
Large scale anomaly detection –
the Anodot system
42
Automatic Anomaly Detection in five Steps: The Anodot Way
Metrics
Collection –
Universal, scale
to millions
Normal
behavior
learning
Abnormal
behavior
learning
Behavioral
Topology
Learning
Feedback
Based Learning
1 2 3 4 5
43
Large Scale Anomaly Detection System Architecture
Kafka
Events
Queue
Anomaly
Grouping
Signals
Correlation
Map
Real-Time
Rollups Store
Cassandra
Anodotd
REST
WebApp
Online
Base Line
Learning
Aggregator
Elasticsearch
DWH S3
HADOOP
HIVE
Offline
Learning
Management
&
Portal
Anodot-Web
User Mgmt
RDBMS
Customer DS
Agent
44
ira@anodot.com
Thank you

Más contenido relacionado

La actualidad más candente

CREDIT CARD FRAUD DETECTION
CREDIT CARD FRAUD DETECTION CREDIT CARD FRAUD DETECTION
CREDIT CARD FRAUD DETECTION K Srinivas Rao
 
How to identify credit card fraud
How to identify credit card fraudHow to identify credit card fraud
How to identify credit card fraudHenley Walls
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithmsankit panigrahy
 
Deep Learning, an interactive introduction for NLP-ers
Deep Learning, an interactive introduction for NLP-ersDeep Learning, an interactive introduction for NLP-ers
Deep Learning, an interactive introduction for NLP-ersRoelof Pieters
 
credit card fraud detection
credit card fraud detectioncredit card fraud detection
credit card fraud detectionjagan477830
 
Adaptive Machine Learning for Credit Card Fraud Detection
Adaptive Machine Learning for Credit Card Fraud DetectionAdaptive Machine Learning for Credit Card Fraud Detection
Adaptive Machine Learning for Credit Card Fraud DetectionAndrea Dal Pozzolo
 
Credit card fraud detection using python machine learning
Credit card fraud detection using python machine learningCredit card fraud detection using python machine learning
Credit card fraud detection using python machine learningSandeep Garg
 
A Study on Credit Card Fraud Detection using Machine Learning
A Study on Credit Card Fraud Detection using Machine LearningA Study on Credit Card Fraud Detection using Machine Learning
A Study on Credit Card Fraud Detection using Machine Learningijtsrd
 
Skin Cancer Detection using Image Processing in Real Time
Skin Cancer Detection using Image Processing in Real TimeSkin Cancer Detection using Image Processing in Real Time
Skin Cancer Detection using Image Processing in Real Timeijtsrd
 
Credit Card Fraud Detection Tutorial
Credit Card Fraud Detection TutorialCredit Card Fraud Detection Tutorial
Credit Card Fraud Detection TutorialKNIMESlides
 
Machine Learning for Fraud Detection
Machine Learning for Fraud DetectionMachine Learning for Fraud Detection
Machine Learning for Fraud DetectionNitesh Kumar
 
Data Science, Machine Learning and Neural Networks
Data Science, Machine Learning and Neural NetworksData Science, Machine Learning and Neural Networks
Data Science, Machine Learning and Neural NetworksBICA Labs
 
Time series forecasting with machine learning
Time series forecasting with machine learningTime series forecasting with machine learning
Time series forecasting with machine learningDr Wei Liu
 
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...Jinwon Lee
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep LearningOswald Campesato
 
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)Fellowship at Vodafone FutureLab
 

La actualidad más candente (20)

CREDIT CARD FRAUD DETECTION
CREDIT CARD FRAUD DETECTION CREDIT CARD FRAUD DETECTION
CREDIT CARD FRAUD DETECTION
 
How to identify credit card fraud
How to identify credit card fraudHow to identify credit card fraud
How to identify credit card fraud
 
Credit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning AlgorithmsCredit card fraud detection using machine learning Algorithms
Credit card fraud detection using machine learning Algorithms
 
Deep Learning, an interactive introduction for NLP-ers
Deep Learning, an interactive introduction for NLP-ersDeep Learning, an interactive introduction for NLP-ers
Deep Learning, an interactive introduction for NLP-ers
 
credit card fraud detection
credit card fraud detectioncredit card fraud detection
credit card fraud detection
 
Adaptive Machine Learning for Credit Card Fraud Detection
Adaptive Machine Learning for Credit Card Fraud DetectionAdaptive Machine Learning for Credit Card Fraud Detection
Adaptive Machine Learning for Credit Card Fraud Detection
 
Credit card fraud detection using python machine learning
Credit card fraud detection using python machine learningCredit card fraud detection using python machine learning
Credit card fraud detection using python machine learning
 
A Study on Credit Card Fraud Detection using Machine Learning
A Study on Credit Card Fraud Detection using Machine LearningA Study on Credit Card Fraud Detection using Machine Learning
A Study on Credit Card Fraud Detection using Machine Learning
 
Skin Cancer Detection using Image Processing in Real Time
Skin Cancer Detection using Image Processing in Real TimeSkin Cancer Detection using Image Processing in Real Time
Skin Cancer Detection using Image Processing in Real Time
 
Credit Card Fraud Detection Tutorial
Credit Card Fraud Detection TutorialCredit Card Fraud Detection Tutorial
Credit Card Fraud Detection Tutorial
 
Credit card fraud dection
Credit card fraud dectionCredit card fraud dection
Credit card fraud dection
 
Machine Learning for Fraud Detection
Machine Learning for Fraud DetectionMachine Learning for Fraud Detection
Machine Learning for Fraud Detection
 
Borderline Smote
Borderline SmoteBorderline Smote
Borderline Smote
 
Fraud detection
Fraud detectionFraud detection
Fraud detection
 
Data Science, Machine Learning and Neural Networks
Data Science, Machine Learning and Neural NetworksData Science, Machine Learning and Neural Networks
Data Science, Machine Learning and Neural Networks
 
Time series forecasting with machine learning
Time series forecasting with machine learningTime series forecasting with machine learning
Time series forecasting with machine learning
 
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...
PR-120: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture De...
 
Introduction to Deep Learning
Introduction to Deep LearningIntroduction to Deep Learning
Introduction to Deep Learning
 
Artifical Neural Network
Artifical Neural NetworkArtifical Neural Network
Artifical Neural Network
 
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)
AlexNet(ImageNet Classification with Deep Convolutional Neural Networks)
 

Similar a Analytics for large-scale time series and event data

"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...
"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A..."Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...
"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...Dataconomy Media
 
Intern Poster Presentation
Intern Poster PresentationIntern Poster Presentation
Intern Poster PresentationDaniel Lee
 
Machine Learning with Big Data using Apache Spark
Machine Learning with Big Data using Apache SparkMachine Learning with Big Data using Apache Spark
Machine Learning with Big Data using Apache SparkInSemble
 
Subverting Machine Learning Detections for fun and profit
Subverting Machine Learning Detections for fun and profitSubverting Machine Learning Detections for fun and profit
Subverting Machine Learning Detections for fun and profitRam Shankar Siva Kumar
 
The math behind big systems analysis.
The math behind big systems analysis.The math behind big systems analysis.
The math behind big systems analysis.Theo Schlossnagle
 
Air conditioner market case study
Air conditioner market case studyAir conditioner market case study
Air conditioner market case studyShashwat Shankar
 
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...BlueHat Security Conference
 
Datascience101presentation4
Datascience101presentation4Datascience101presentation4
Datascience101presentation4Salford Systems
 
Developing Web-scale Machine Learning at LinkedIn - From Soup to Nuts
Developing Web-scale Machine Learning at LinkedIn - From Soup to NutsDeveloping Web-scale Machine Learning at LinkedIn - From Soup to Nuts
Developing Web-scale Machine Learning at LinkedIn - From Soup to NutsKun Liu
 
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06Fabrice Trollet
 
Rise of the machines -- Owasp israel -- June 2014 meetup
Rise of the machines -- Owasp israel -- June 2014 meetupRise of the machines -- Owasp israel -- June 2014 meetup
Rise of the machines -- Owasp israel -- June 2014 meetupShlomo Yona
 
Disrupt the static nature of BI with Predictive Anomaly Detection
Disrupt the static nature of BI with Predictive Anomaly DetectionDisrupt the static nature of BI with Predictive Anomaly Detection
Disrupt the static nature of BI with Predictive Anomaly DetectionAnodot
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerDatabricks
 
ThirdEye - LinkedIn's Business-wide monitoring platform
ThirdEye - LinkedIn's Business-wide monitoring platformThirdEye - LinkedIn's Business-wide monitoring platform
ThirdEye - LinkedIn's Business-wide monitoring platformAkshay Rai
 
Causal reasoning and Learning Systems
Causal reasoning and Learning SystemsCausal reasoning and Learning Systems
Causal reasoning and Learning SystemsTrieu Nguyen
 
Health & Status Monitoring (2010-v8)
Health & Status Monitoring (2010-v8)Health & Status Monitoring (2010-v8)
Health & Status Monitoring (2010-v8)Robert Grossman
 
Anomaly Detection - Real World Scenarios, Approaches and Live Implementation
Anomaly Detection - Real World Scenarios, Approaches and Live ImplementationAnomaly Detection - Real World Scenarios, Approaches and Live Implementation
Anomaly Detection - Real World Scenarios, Approaches and Live ImplementationImpetus Technologies
 
IRJET - A Review on Mining High Utility Itemsets
IRJET - A Review on Mining High Utility ItemsetsIRJET - A Review on Mining High Utility Itemsets
IRJET - A Review on Mining High Utility ItemsetsIRJET Journal
 

Similar a Analytics for large-scale time series and event data (20)

"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...
"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A..."Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...
"Building Anomaly Detection For Large Scale Analytics", Yonatan Ben Shimon, A...
 
Intern Poster Presentation
Intern Poster PresentationIntern Poster Presentation
Intern Poster Presentation
 
Intro to ml_2021
Intro to ml_2021Intro to ml_2021
Intro to ml_2021
 
Machine Learning with Big Data using Apache Spark
Machine Learning with Big Data using Apache SparkMachine Learning with Big Data using Apache Spark
Machine Learning with Big Data using Apache Spark
 
Subverting Machine Learning Detections for fun and profit
Subverting Machine Learning Detections for fun and profitSubverting Machine Learning Detections for fun and profit
Subverting Machine Learning Detections for fun and profit
 
The math behind big systems analysis.
The math behind big systems analysis.The math behind big systems analysis.
The math behind big systems analysis.
 
Air conditioner market case study
Air conditioner market case studyAir conditioner market case study
Air conditioner market case study
 
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...
BlueHat v18 || Crafting synthetic attack examples from past cyber-attacks for...
 
Datascience101presentation4
Datascience101presentation4Datascience101presentation4
Datascience101presentation4
 
Developing Web-scale Machine Learning at LinkedIn - From Soup to Nuts
Developing Web-scale Machine Learning at LinkedIn - From Soup to NutsDeveloping Web-scale Machine Learning at LinkedIn - From Soup to Nuts
Developing Web-scale Machine Learning at LinkedIn - From Soup to Nuts
 
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06
Traditional Testing vs MaTeLo Model-Based Testing Tool v2.06
 
Rise of the machines -- Owasp israel -- June 2014 meetup
Rise of the machines -- Owasp israel -- June 2014 meetupRise of the machines -- Owasp israel -- June 2014 meetup
Rise of the machines -- Owasp israel -- June 2014 meetup
 
Disrupt the static nature of BI with Predictive Anomaly Detection
Disrupt the static nature of BI with Predictive Anomaly DetectionDisrupt the static nature of BI with Predictive Anomaly Detection
Disrupt the static nature of BI with Predictive Anomaly Detection
 
Experimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles BakerExperimental Design for Distributed Machine Learning with Myles Baker
Experimental Design for Distributed Machine Learning with Myles Baker
 
Simulation
SimulationSimulation
Simulation
 
ThirdEye - LinkedIn's Business-wide monitoring platform
ThirdEye - LinkedIn's Business-wide monitoring platformThirdEye - LinkedIn's Business-wide monitoring platform
ThirdEye - LinkedIn's Business-wide monitoring platform
 
Causal reasoning and Learning Systems
Causal reasoning and Learning SystemsCausal reasoning and Learning Systems
Causal reasoning and Learning Systems
 
Health & Status Monitoring (2010-v8)
Health & Status Monitoring (2010-v8)Health & Status Monitoring (2010-v8)
Health & Status Monitoring (2010-v8)
 
Anomaly Detection - Real World Scenarios, Approaches and Live Implementation
Anomaly Detection - Real World Scenarios, Approaches and Live ImplementationAnomaly Detection - Real World Scenarios, Approaches and Live Implementation
Anomaly Detection - Real World Scenarios, Approaches and Live Implementation
 
IRJET - A Review on Mining High Utility Itemsets
IRJET - A Review on Mining High Utility ItemsetsIRJET - A Review on Mining High Utility Itemsets
IRJET - A Review on Mining High Utility Itemsets
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Analytics for large-scale time series and event data

  • 1. 1 Building Anomaly Detection For Large Scale Analytics Ira Cohen, Chief Data Scientist 16th May, 2016
  • 2. 2 Outline Anomaly detection? Why do I need it? Design principals for Anomaly Detection What is anomaly detection? Anomaly Detection Methods The Anodot System
  • 4. 4 Detecting the Unknowns  Saves Time + Money Industrial IoT Proactive Maintenance Detecting issues in factories/machines Web Services Detecting business incidents + unknown business opportunities Machine Learning Closing the “Machine Learning” loop Tracking and detecting ”unknowns” not modeled during training Security Detection of unknown breach/attack patterns
  • 5. 5 Business Incidents - More go undetected as the business grows $$$$ $$ $ $$
  • 6. 6 Detecting Business Incidents: Metric Driven Detection Business Business Generation: Leads, visitors, usage, engagements App: Performance, errors, usability Infra utilization/state: Middleware, network, System e.g., Purchases per product, Conversions per campaign… Per Geo, user segment, page, browser, device… Per class, method, feature… Per host, database, switch…
  • 7. 7 Detecting Business Incidents: Metric Driven Detection Drop in # of visitors Decrease in ad conversion on Android Price glitch – increase in purchases / decrease in revenue
  • 8. 8 Setting alerts with thresholdsDashboards Manual Detection of Business incidents
  • 9. 9 Manual Solutions: Drowning in a “Sea of Data” MISSED INCIDENTS FALSE ALARMS GENUINE ALERTS Too many parameters to set thresholds Too much data to analyze in real time
  • 10. 10 What is Anomaly Detection?
  • 12. 12 Anomaly Detection 12 • Ill posed problem • What is an anomaly?
  • 13. 13 Anomaly Detection in Time Series Signals Unexpected change of temporal pattern of one or more time series signals.
  • 15. 15 Anomaly Detection: Design Considerations Timeliness Real time vs. Retroactive Detection Scale 100’s vs. Millions of metrics Rate of change Adaptive vs. Offline learning Conciseness Univariate vs. Multivariate methods Well defined incidents? Supervised vs. Unsupervised methods
  • 16. 16 Timeliness: Real time vs. Retroactive Detection Real time decision making Non-real time decision making Reduction in visitors/revenues Check for bugs Increase in product purchase Increase inventory Increase in ad conversion w/o increase in impressions check for fraud Capacity Planning Marketing budget allocations Data Cleaning Scheduled Maintenance
  • 17. 17 Timeliness: Real time vs. Retroactive Detection Real time decision making Non-real time decision making Online learning: Cannot iterate over the data More prone to False Positives Scales more easily Batch learning: can iterate over the data Easier to remove False Positives Poor scaling
  • 18. 18 Rate of change Constant change Very slow change • Most common case • ”Closed” systems – e.g., airplanes, large machinery • Requires adaptive algorithms • Learn once and apply the model for a long time
  • 19. 19 Conciseness of Anomalies Univariate Anomaly Detection Multivariate Anomaly Detection • Learn normal model for each metric • Anomaly detection at the metric level • Easier to scale • Causes anomaly storms: Can’t see the forest from the trees • Easier to model many types of behaviors • Learn single model for all metrics • Anomaly detection of complete incident • Hard to scale • Hard to interpret the anomaly • Often requires metric behaviour to be homogeneous Hybrid approach • Learn normal model for each metric • Combine anomalies to single incidents if metrics are related • Scalable • Can combine multiple types of metric behaviours
  • 20. 20 Well defined incidents? Yes - Supervised methods No - Unsupervised methods • Requires a well defined set of incidents to identify • Learning a model to classify samples as normal or abnormal • Requires labeled examples of anomalies • Cannot detect new types of incidents • Learning a normal model only • Statistical test to detect anomalies • Can detect any type of anomaly known or unknown Semi-Supervised methods • Use few labelled examples to improve detection of unsupervised methods. • Or – use unsupervised detection for unknown cases, supervised detection to classify already known cases.
  • 22. 22 Unsupervised Anomaly Detection General scheme Step 1 Step 2 Step 3 Model the normal behavior of the metric(s) using a statistical model Devise a statistical test to determine if samples are explained by the model. Apply the test for each sample. Flag as anomaly if it does not pass the test
  • 23. 23 Very Simple Model 1σ1σ 2σ2σ 3σ3σ μ 99.7% 95.4% 68% Assume normal behavior is the Normal distribution Estimate the average, standard deviation over all samples Test: any sample |x-average|> 3*standard deviation is abnormal
  • 24. 24 A single model does not fit them all! Smooth (stationary) Irregular sampling Multi Modal Sparse Discrete “Step”
  • 25. 25 Metric types distribution Based on 50,000,000 metrics sampled from dozens of companies Nearly constant, 2% Discrete, 15% Sparse, 3% Multi Modal, 5% Smooth, 38% Irregular sampling, 37% All Industries
  • 26. 26 Example: The importance of modeling seasonality Single seasonal pattern
  • 27. 27 Example: The importance of modeling seasonality Multiple seasonal patterns (“Amplitude modulation”)
  • 28. 28 Example: The importance of modeling seasonality Multiple seasons – Additive signals
  • 29. 29 Seasonality Distribution Season: 3 hours, 2% Season: 12 hours, 1% Season: 2 hours, 1% Season: 1 hours, 1% Season: 6 hours, 0.5% Season: 4 hours, 0.2% Season: 5 hours, 0.1% Season: 24 hours, 69% Season: Weekly, 26% Note: Only 14% of the metrics have season
  • 30. 30 Example Methods to detect seasonality Finding maximums in Auto- correlation of signal Computationally expensive More robust to gaps Finding maximum(s) in Fourier transform of signal Challenging to detect low frequency seasons Challenging to discover multiple seasons Sensitive to missing data Exhaustive search based on cost function Computationally expensive Robust to gaps Challenging to discover multiple seasons
  • 31. 31 Real time detection @ scale = Online learning algorithms 1 2 3 Initialize model For each new sample test if anomaly Update model parameters with each new sample
  • 32. 32 Example Online Models/Algorithms 4 2 1 3 Simple Moving Average Double/Triple exponential (Holt- Winters) Kalman Filters + ARIMA and variations Single exponential forgetting
  • 33. 33 Example: Simple exponential forgetting (Normal distribution model) Define alpha – forgetting factor Compute initial average, sumOfSquares using initial samples For each new sample, x[t] If |x[t]-average[t-1]|> 3* Stddev[t-1] Flag x[t] as an anomalous sample average[t] = alpha*x[t] + (1-alpha)*average[t-1] sumOfSquares[t] = alpha*x^2 + (1-alpha)*sumOfSquares[t-1] Stddev[t] = sqrt(sumOfSquares[t] – average[t]^2)
  • 34. 34 Update rate with online models: Avoiding pitfalls What should be the learning rate? Too Slow Too Fast
  • 35. 35 Update rate with online models: Avoiding pitfalls What should be the learning rate? “Al Dente” Auto tuning required!
  • 36. 36 Update rate with online models: Avoiding pitfalls How to update a model when there is an anomaly? Strategy A: Update as usual Most of the anomaly is missed
  • 37. 37 Update rate with online models: Avoiding pitfalls Full anomaly captured How to update a model when there is an anomaly? Strategy B: Adapt the learning rate
  • 38. 38 Batch models 1 2 3 4 Collect historical samples Segment samples to similarly behaving segments Cluster segments according to some similarity measure Mark as anomalies segments that are in small or no clusters
  • 39. 39 Example Batch Anomaly Detection Methods Multi-model distributions: • Gaussian models • Generalized mixture models One sided SVM PCA Clustering methods (K-Means, DBScan, Mean- Shift) MOST COMMON IN USE Hidden Markov Models
  • 40. 40 Anomaly detection methods - examples NAME ADAPTIVE? REALTIME? SCALABLE? UNI-MULTI VARIATE Holt-Winters Yes Yes Yes Univariate ARIMA + Kalman Yes Yes Yes Both HMM No Yes No Multivariate GMM No No No Both DBScan No No No Multivariate K-Means No No No Multivariate
  • 41. 41 Large scale anomaly detection – the Anodot system
  • 42. 42 Automatic Anomaly Detection in five Steps: The Anodot Way Metrics Collection – Universal, scale to millions Normal behavior learning Abnormal behavior learning Behavioral Topology Learning Feedback Based Learning 1 2 3 4 5
  • 43. 43 Large Scale Anomaly Detection System Architecture Kafka Events Queue Anomaly Grouping Signals Correlation Map Real-Time Rollups Store Cassandra Anodotd REST WebApp Online Base Line Learning Aggregator Elasticsearch DWH S3 HADOOP HIVE Offline Learning Management & Portal Anodot-Web User Mgmt RDBMS Customer DS Agent