AI anomaly detection in data: automated quality monitoring

Manual data control cannot keep up with volume: sensor and export failures are noticed only by their consequences. We set up turnkey automated anomaly detection — from data analysis to team regulations. Monitoring reduces response time many times over and removes manual checks from employees.

AI Development Areas

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1365
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Automatic anomaly detection: where manual control breaks down

Manual data quality control relies on scheduled exports and reconciliations: an analyst takes a snapshot, compares it with the previous period, notes gaps in the data — and that closes the check until the next cycle.

While they are analyzing one snapshot, new batches of records arrive in the system, and none of them are checked. Between two checks, a volume accumulates that physically cannot pass through human eyes.

The main cost follows from this — the delay in detecting a failure. While an anomaly lives in the data, metrics are already calculated, reports are built, and decisions are made based on it.

The error surfaces days later, when its source is partially lost: some events arrived with loss, some were overwritten, and restoring the picture with the former accuracy is no longer possible.

Long time series finish off manual reconciliation for good. Seasonality, a smooth trend, one-off load spikes — at the fortieth point they cannot be distinguished from a failure by a single value.

A threshold set by eye works in two modes: either it misses a real deviation or it produces a stream of false positives, and both scenarios undermine trust in monitoring.

Automatic anomaly detection is structured differently: checks run not by calendar but as records arrive — the expected behavior profile is maintained on a sliding window, seasonality and trend are accounted for separately, and data gaps are recorded at the moment of writing, not at the end of the week. Let's break down how this is covered.

Measurable effect: what changes after monitoring implementation

Before monitoring implementation, a deviation is most often found from a complaint or during a scheduled export — by that time, the error has already spread across data marts and affected decisions.

The effect accumulates in waves: some metrics change in the first day, the rest — as statistics accumulate. Below is the order in which this becomes visible.

  1. First day. The normal profile is built from historical data: distributions, seasonality, acceptable corridors of values and relationships between fields. Even here, coarse failures are caught — gaps, zero spikes, breaks in the stream. The time from deviation to signal is reduced from days to minutes.

  2. First week. Thresholds adapt to specific metrics: where any shift matters, and where a seasonal dip is acceptable. The share of missed failures drops severalfold because not only the value is checked, but also its dynamics and the consistency of fields with each other.

  3. First month. Manual checks shrink to reviewing confirmed signals: the analyst looks not at whole summaries but at a few cases with context — what changed, when, which segment was affected. Early warning arrives before the error reaches reporting.

  4. Quarter. Accumulated alert statistics separate noise from systemic failures, thresholds are reviewed based on facts. Incident response time becomes predictable, and the retrospective shows which classes of errors have disappeared entirely.

Signals go to a single monitoring dashboard and to the on-call team's channel — for example, via Grafana — so analysis does not require a separate tool. From the accumulated data, not only the fact of a failure is visible, but also its duration and the volume of affected records.

Monitoring modes: batch, streaming, and hybrid

The monitoring mode is chosen not by data volume, but by the acceptable delay between an event and a signal. If a discrepancy in a report can be noticed in the morning, a streaming pipeline is not needed — it adds infrastructure without gain.

If line downtime is measured in minutes, batch data validation physically cannot keep up: by the time of the next run, the damage has already been done.

Option When it fits Limitations
Batch validation Regular exports and reconciliations, historical snapshots, scheduled reporting No control between runs; an anomaly is visible only after the next window
Streaming monitoring Continuous event stream, reaction needed within seconds Higher infrastructure requirements; sensitive to duplicates and delivery delays
Hybrid control scheme Mixed sources: some data arrives online, some in batches Rules between pipelines must be coordinated, otherwise verdicts diverge

How to choose a mode

Data polling frequency is the main configuration parameter: in batch mode, it is the run schedule; in streaming, it is the aggregation window and trigger threshold. Too frequent a window produces false alarms on natural fluctuations; too rare misses short spikes.

Automatic anomaly detection relies on the same set of rules and thresholds in all three modes. Therefore, moving from batch validation to a hybrid scheme does not require retraining models — only the data delivery layer and the method of signal aggregation change.

Implementation stages: from data review to handover of regulations

Implementing automatic anomaly detection is not installing a model, but a sequence of steps where each next one relies on the result of the previous one.

A skipped source audit or criteria set "by eye" produces a system that either floods with false signals or stays silent on real failures.

  • Data source audit. We record where data comes from, at what frequency and completeness, and what delays are acceptable. The output is a list of sources with owners and a quality assessment.
  • Defining anomaly criteria. We translate "this looks strange" into measurable rules: normal boundaries, critical deviations, seasonality, one-off promotions. We document the criteria in writing — they are what we use to accept the work.
  • Feature schema. From raw fields, we assemble window aggregates, deviations from the expected value, dynamics, and categorical slices; separately, we decide how to handle gaps.
  • Configuring rules and models. Thresholds cover explicit violations; statistical and trainable models cover non-obvious combinations. For each signal, it is clear what exactly caused it.
  • Validation on historical data. We run the settings on accumulated history and compare what is found with real failures: we tune thresholds so that significant events are not lost and noise remains acceptable.
  • Integration into monitoring. We connect the computation to your schedule or event stream, and alerts — by severity levels and owners. The signal arrives where it will actually be seen.
  • Handover of the response regulation. We deliver a document: who reviews a signal and within what timeframe, what actions are mandatory, and when thresholds are revised. Plus a monitoring dashboard and instructions for updating rules.

After launch, we compare actual behavior with history, remove noisy rules, and refine features — the share of false positives drops, and the time from event to signal is measured in minutes.

What we hand over: rules, schemas, and regulations

Anomaly detection rules are a living pipeline: sensitivity thresholds and exclusion lists have to be changed more often than the model itself.

Therefore, we hand over not a "working service" but a set of artifacts by which the system is reproduced, modified, and maintained by your team or another contractor.

  • Rule configuration: files of thresholds, averaging windows, and exclusions for seasonality and known outliers — edited without rebuilding the model.
  • Data flow schema: sources, normalization points, storage, alert routes, and places where the flow can be lost.
  • Data access policies: which roles see raw records, which only aggregates, who leaves a trace in the access log and how.
  • Response regulation: procedure for reviewing an alert, signs of a false positive, timeframes, owners, and the path for a rule to be revised.
  • Catalog of features and metrics: what each indicator means, expected range, business owner.
  • Deployment and rollback instructions: how to bring up an environment from scratch and return to the previous set of rules.
  • Validation report: on which historical periods it was tested, what share of alerts turned out to be false, and which data areas remained outside control.

Case study: anomalies in a telemetry stream before and after implementation

The telemetry stream went through Kafka — tens of thousands of events per hour from equipment and internal services. Data quality was controlled manually: once a day, an analyst exported aggregates and compared them with the previous period.

An anomaly lived in the system for up to 19 hours before it was noticed — during that time, reports managed to be recalculated and reach management dashboards.

False positives were the norm: out of ten raised signals, two were confirmed, because thresholds were set on raw values without accounting for seasonality and load.

What we changed

We described the behavior of each indicator with a profile: distribution, daily and weekly cycle, relationship with neighboring metrics.

A deviation was caught not by a single threshold but by a combination of features — divergence from the forecast, a break in correlations, gaps in the stream.

We separately configured the confirmation time: a signal is escalated only if the deviation persists longer than one collection cycle.

Metrics before and after

Metric Before After
Anomaly detection time up to 19 hours 8 minutes
Share of false signals 80% 9%
Data source coverage 4 out of 20 20 out of 20

Expanding coverage did not require separate pipelines for each source: new streams were connected by describing a profile, not by changing code. Incident review now starts with a ready-made card — which indicator, in which window, and how much it deviated from the norm.

How do threshold rules differ from machine learning models?

A threshold rule is a deterministic check: a value crossed a boundary, the share of gaps exceeded the allowed level, the growth rate deviated from the planned one.

Such a rule is easy to explain to the on-call engineer and easy to test on history, so it is almost always worth starting with it. There is one limitation: the rule describes one metric in isolation from the others.

Machine learning models are needed where the norm is defined by the joint behavior of features. For example, latency, request volume, and error count are individually normal, but their combination has never occurred.

Here, outlier detection methods work — for example, Isolation Forest or an autoencoder that reconstructs the normal profile and signals a large divergence.

The model does not replace the threshold: the anomaly score becomes another number, whose boundary is set explicitly and revised consciously.

Data drift breaks both approaches, but in different ways. A fixed threshold becomes outdated silently: seasonal growth or a source change looks like an incident, and the team gradually gets used to ignoring the signal.

A model degrades more gently but more imperceptibly — quality drops, and this is not visible in summary metrics until a stream of missed incidents accumulates.

Therefore, the choice of detection method is not either/or but a distribution of roles. Hard thresholds hold critical boundaries where the cost of a miss is highest; the model provides an early signal on multidimensional shifts.

On top, drift control is added: retraining on a sliding window, monitoring the alert rate, labeling confirmed anomalies by the on-call engineer, and regular validation on a holdout period. Such a pipeline produces fewer false alarms and does not go silent when data behavior changes.

False positives, labeling, and model cold start

Sensitivity is not a single knob but a profile of thresholds: separately for revenue, separately for failure count and latency, separately for metrics with weakly expressed seasonality.

The threshold is set in deviations from the expected corridor, not in absolute values — otherwise a planned spike at the end of the month will look like a failure, and each such case will consume the on-call shift's time.

Incident labeling is done by your experts: confirming or dismissing a signal takes a minute directly from the card, and this feedback goes into retraining.

While accumulated history is shorter than one seasonal cycle, cold start is enabled: statistical boundaries and rules, which the model replaces as data accumulates.

Will the system not flood us with false positives?

For the first weeks, it operates in observation mode: signals accumulate and are reviewed, but do not go to on-call. After reviewing the initial sample, thresholds are tightened for each metric, and the share of unnecessary signals drops severalfold relative to the first week.

Who labels incidents, and how labor-intensive is it?

Labeling is done from the signal card in one click: confirm, dismiss, or specify the reason. This is usually done by those already responsible for the metric — from one to three people. Labeled cases become the training sample, so the routine decreases over time.

What if there is less history than a seasonal cycle?

We start with rules and confidence intervals: they catch obvious drops and outliers without training on history. In parallel, we test the model on recreated failure scenarios.

As soon as enough data accumulates for a full cycle, thresholds are recalculated, and the rules go into reserve.

Let's discuss the task: what is needed to launch monitoring

To assess the launch of data monitoring, full access to the production environment is not needed. Input data is enough — exports and a description of how the data currently lives: where it comes from, at what frequency, and where it has already broken. This is enough for us to come back with an assessment and a work plan.

  • historical exports for several observation periods — using them, we check which deviations are reproducible and which drown in natural variance;
  • list of sources and arrival schedule: how often data arrives, whether there are delays, duplicates, and gaps;
  • description of target metrics and acceptable boundaries — what is normal for you and what is an incident;
  • log of known failures for the previous period: it sets the labeling and allows measuring detection completeness on real cases;
  • alerting requirements: who receives a signal, in which channel, and what is considered critical outside working hours;
  • access restrictions: we work in your infrastructure or in a separate environment, and which data cannot be exported;
  • business-side owner for review — who receives questions when the model flags a deviation.

We launch the pilot pipeline on historical data: it does not touch production processes and shows the real noise level before alerts are enabled.

The output is initial thresholds, the share of false positives on the validation window, and a plan for expanding to the remaining sources. Describe the task — we will come back with an assessment and a plan.