Anomaly detection
Anomaly detection is the identification of observations, events, or behaviors that substantially deviate from expected patterns or a normal baseline.
Data-Driven Cybersecurity
An anomaly is an observation or activity that deviates significantly from an expected pattern or reference value.
- How it is used
- Uses deviations from normal activity to direct cybersecurity investigation and support earlier threat detection.
- How deep it goes
- Defines behavioral baselines and works through detection examples and Python methods, while treating flags as candidates requiring investigation rather than proof.
- Examples
- Illustrates suspicious transfers and geographic login patterns, then uses synthetic network-device data for a DBSCAN exercise.
- What you can do after
- Apply it via Python examples to flag unusual activity, then investigate alerts and assess detection and response metrics.
Read how Data-Driven Cybersecurity explains anomaly detection →
Time Series Forecasting Using Foundation Models
Anomaly detection is the task of identifying observations or patterns that substantially deviate from expected behavior.
- How it is used
- Deploys anomaly detection as a secondary capability of time-series forecasting models for practical series monitoring.
- How deep it goes
- Works through rolling forecasts, interval thresholds, implementation functions, plots, and precision-recall evaluation, but stops short of comprehensive benchmarking.
- Examples
- Uses daily New York City taxi rides to compare TimeGPT, Chronos, Moirai, Time-LLM, Flan-T5, and Llama-3.2.
- What you can do after
- Apply it via forecasting APIs or Python workflows, then diagnose detections with plots and precision, recall, and F1 score.
Read how Time Series Forecasting Using Foundation Models explains anomaly detection →
Financial AI in Practice
The identification of observations or patterns that substantially differ from expected behavior, including without labeled training examples.
- How it is used
- Flags novel single-transaction patterns alongside supervised fraud detection.
- How deep it goes
- Works through autoencoder training, reconstruction-error scoring, threshold selection, shadow testing, and ongoing monitoring.
- Examples
- Uses legitimate transaction training data, labeled fraud test data, reconstruction-error plots, and a shadow-mode alert workflow.
- What you can do after
- Apply it via Keras and TensorFlow to score transactions, then test and monitor an operational threshold.
Read how Financial AI in Practice explains anomaly detection →
AI Governance
Anomaly detection is the identification of observations or behaviors that significantly deviate from an expected pattern.
- How it is used
- Monitors agent decision steps to detect departures from established safe behavior, extending visibility beyond network traffic.
- How deep it goes
- Tracks planning, tool selection, and intermediate conclusions, while recommending evaluation of observability tools rather than building from scratch.
- Examples
- Uses an agent skipping a mandatory compliance step as a behavioral deviation.
- What you can do after
- Diagnose unsafe workflow deviations by monitoring agent planning, tool selection, and intermediate conclusions.
Cloud Observability in Action
Anomaly detection is the identification of observations or behavior that significantly deviates from an established normal baseline.
- How it is used
- Uses metric baselines to identify abnormal service behavior and trigger operational alerts.
- How deep it goes
- Explains baselines, normal ranges, automation, and alerting, but defers detailed detection methods.
- Examples
- Uses metric thresholds, healthy-service observations, Prometheus anomaly detector, and CloudWatch website monitoring.
- What you can do after
- Operate metric monitoring by establishing baselines, recognizing deviations, and configuring notifications for abnormal values.
Read how Cloud Observability in Action explains anomaly detection →
Digital Twins in Action
An anomaly is an observation or condition that deviates from expected system behavior or normal operating patterns.
- How it is used
- Detects unusual sensor behavior in digital twins to provide early warning of degradation, process drift, or safety concerns.
- How deep it goes
- Works through a rolling z-score calculation and explains how an evolving baseline affects alerts.
- Examples
- Uses indoor PM2.5 readings and daily temperature summaries to illustrate statistical detection and visual inspection.
- What you can do after
- Apply it via pandas and NumPy to flag PM2.5 readings beyond a rolling z-score threshold.
Read how Digital Twins in Action explains anomaly detection →
Machine Learning Algorithms in Depth
A technique for identifying observations that differ substantially from established data patterns.
- How it is used
- Flags unusual observations in unlabeled data and detects anomalous behavior in time-series sensors.
- How deep it goes
- Derives Gaussian likelihoods, latent-space regularization, training objectives, thresholding, and a from-scratch LSTM-VAE implementation.
- Examples
- Uses distant points from clusters, multivariate sensor signals, a square wave, and the Numenta Anomaly Benchmark.
- What you can do after
- Implement an LSTM-VAE anomaly detector from scratch with Keras/TensorFlow and threshold log-likelihood drops.
Read how Machine Learning Algorithms in Depth explains anomaly detection →
Fundamentals of Cybersecurity
Anomaly-based detection identifies potential threats by flagging deviations from a learned or defined baseline of normal behavior.
- How it is used
- Supports SIEM log analysis by flagging deviations from normal behavior and helps monitor traffic for suspicious command-and-control activity.
- How deep it goes
- Defines baseline learning and deviation alerts, notes early false positives, but gives no implementation procedure.
- Examples
- Uses failed logins, unexpected access, system changes, and unusual outbound protocols, destinations, or data volumes as suspicious patterns.
- What you can do after
- Diagnose potential C2 activity by monitoring for irregular protocols, destinations, or data volumes.
Read how Fundamentals of Cybersecurity explains anomaly detection →
Data Without Labels
Anomaly detection is the identification of observations or behaviors that deviate substantially from an expected pattern.
- How it is used
- Uses unlabeled data to discover expected patterns and flag outliers for investigation.
- How deep it goes
- Defines pattern-based detection and reconstruction error, but stops short of implementation procedures, thresholds, and evaluation metrics.
- Examples
- Uses network-provider monitoring, outliers in clustered data, and autoencoder reconstruction errors as concrete detection examples.
- What you can do after
- Evaluate unusual observations using unsupervised patterns, outliers, or autoencoder reconstruction error.
Vibe Engineering
Anomaly detection is the identification of unusual patterns or deviations from expected behavior in data or system operation.
- How it is used
- Supports automated observability when human supervision is removed from agent-driven pipelines.
- How deep it goes
- Explains its operational role and supporting controls but does not specify detection algorithms, thresholds, or implementation details.
- Examples
- Uses agent behavior, broken builds, incorrect reports, security incidents, and sampled outputs as operational examples.
- What you can do after
- Operate agent pipelines with earlier warnings, cheaper intervention, and supporting evidence for debugging and drift review.
Also covered in
- Hidden InfluencesIn early access (MEAP)
- Snowflake Data Engineering
- Introduction to Generative AI, Second Edition
- Apache Kafka in Action
- The Art of AI Product Development
- Acing the Frontend InterviewIn early access (MEAP)
- Generative AI in Action
- Cyber Threat Hunting
- Azure Security
- Designing AI SystemsIn early access (MEAP)
- Causal AI
- Transfer Learning for Natural Language Processing
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- machine learningMachine learning is a field of computational methods in which systems learn patterns or relationships from data to make predictions, decisions, or other outputs.
- supervised learningSupervised learning is a machine-learning approach that learns predictive relationships from examples paired with known target outputs or labels.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
Related concepts
- fraud detectioncontrasts with · Fraud detection is the process of identifying transactions, activities, or other events suspected of involving intentional deception or unauthorized gain.
- autoencoderaddressed by · An autoencoder is a neural network that encodes input data into an internal representation and decodes it to reconstruct the input or an approximation.
- support vector machineused by · A support vector machine is a supervised-learning model that uses support vectors to define a maximum-margin decision boundary or regression function, with kernels enabling nonlinear relationships.
- unsupervised learningused by · Unsupervised learning is a machine-learning approach that discovers patterns, structure, or representations in data without labeled target outputs.
- amplificationuses · Amplification is an increase in the reach, visibility, or influence of information or viewpoints through communication or distribution.
- Chronosused by · Chronos is a foundation model and framework for probabilistic time-series forecasting that adapts language-model methods to temporal data.
Questions about anomaly detection
What is anomaly detection?
Anomaly detection is the identification of observations, events, or behaviors that substantially deviate from expected patterns or a normal baseline.
Which Manning books explain anomaly detection?
Data-Driven Cybersecurity, Time Series Forecasting Using Foundation Models, Financial AI in Practice, AI Governance, Cloud Observability in Action, Digital Twins in Action, Machine Learning Algorithms in Depth, Fundamentals of Cybersecurity and 2 more.
What should I know before learning anomaly detection?
Manning books that teach anomaly detection usually introduce language model, machine learning, supervised learning and CPU first.
What is the difference between anomaly detection and fraud detection?
Anomaly detection is the identification of observations, events, or behaviors that substantially deviate from expected patterns or a normal baseline. Fraud detection is the process of identifying transactions, activities, or other events suspected of involving intentional deception or unauthorized gain.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









