# Massive Scale Anomaly Detection Framework

- Speaker: [Uri Silberstein](/wiki/speakers/uri-silberstein.md), [Guy Gerson](/wiki/speakers/guy-gerson.md)
- Event: [Reversim Summit 2019](/wiki/years/2019.md)
- Video: https://www.youtube.com/watch?v=YxRNT_8yeFc
- Transcript: [/transcripts/2019/43-YxRNT_8yeFc.md](/transcripts/2019/43-YxRNT_8yeFc.md)
- Language: Hebrew · Type: talk · Level: advanced
- Topics: [Machine Learning](/wiki/topics/machine-learning.md), [Data Engineering](/wiki/topics/data-engineering.md), [Debugging](/wiki/topics/debugging.md), [Data Science](/wiki/topics/data-science.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

This talk explores the engineering challenges of building a massive scale anomaly detection framework for stream processing. The speaker discusses how to balance developer productivity, data scale, and low latency while implementing diverse anomaly detection models. The presentation introduces an open-source framework built on Spark that abstracts much of the underlying complexity and simplifies the creation of streaming anomaly detection pipelines. Through practical examples, the audience learns how structured data pipelines, statistical approaches, and caching strategies help uncover valuable insights from large datasets.

## Key points

- [0:10](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=10s) Detecting unknown vulnerabilities and anomalies is a major challenge for modern systems.
- [3:12](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=192s) The speaker introduces an open-source stream processing platform for anomaly detection built on Spark.
- [6:27](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=387s) Anomaly detection can be abstracted into three questions regarding current observations, expected behavior, and significant variance.
- [7:29](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=449s) Scaling is defined across three dimensions: developer productivity, data volume, and processing latency.
- [14:08](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=848s) Building an anomaly detection pipeline involves event streams, windowing, aggregation, modeling, and reporting.
- [19:41](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=1181s) Code examples demonstrate how a Domain Specific Language can be used to define anomaly pipelines concisely.
- [22:25](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=1345s) Pipeline definitions are flattened and optimized into a single execution graph running on Spark Structured Streaming.
- [25:39](https://www.youtube.com/watch?v=YxRNT_8yeFc&t=1539s) Achieving low latency requires limiting processing time, reducing memory footprint, and utilizing lazy evaluation with caching.

## Takeaways

- Bridge the gap between research and production by designing flexible pipelines that reduce iteration cycles.
- Utilize efficient windowing and data aggregation to maintain a low memory footprint during high-throughput stream processing.
- Leverage approximation algorithms and caching mechanisms to optimize heavy computational tasks like percentile and statistical calculations.

## Questions this talk answers

- How do you design a stream processing framework that supports multiple distinct anomaly detection algorithms?
- How can you bridge the gap between machine learning research models and production-ready code?
- What strategies can be used to maintain low latency and low memory footprints when processing massive real-time data streams?

## Technologies

Spark, Kafka

## Tags

anomaly detection, big data, distributed systems, machine learning, scalability, stream processing
