﻿# AIOps KPI streams need identity-preserving gap completion and missingness masks

Keep KPI competition streams separate before timestamp completion, distinguish inserted zero placeholders from observed zeros, and retain missingness through train/test preparation.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-aiops-kpi-single-stream-gap-completion-mask/
Language: en

## Competition artifacts and model examples are separate resources

An AIOps experiment may concatenate KPI records and pass the resulting timeline to a single-stream helper. Shared timestamps from different metrics then look like duplicates or become falsely adjacent. Metric identity must be resolved before temporal completion.

The [competition publisher repository](https://github.com/NetManAIOps/KPI-Anomaly-Detection) distributes separate stage collections. Preserve the selected collection and its stream identities instead of assuming every file belongs to one continuous scalar KPI.

## Completion has a concrete grid contract

The [Donut preprocessing implementation](https://raw.githubusercontent.com/NetManAIOps/donut/master/donut/preprocessing.py) sorts timestamps, derives a grid from their minimum interval, and rejects duplicate timestamps. Its helper operates on a single timestamp sequence with corresponding arrays.

Apply such a contract within the intended stream, not across unrelated metrics. Missing intervals and duplicate coordinates are different cases. A duplicate may need source review rather than automatic averaging that silently changes both values and labels.

## Inserted zeros remain marked as missing

The helper fills added array positions with zeros and returns a missingness indicator. That indicator is essential: a placeholder zero is not evidence of a measured zero or an observed normal label.

Preserve the mask through batching and score export. The [tensor-axis guide](/journal/tensor-axes-batch-sequence-hidden/) helps distinguish a missing time position from another sensor dimension or an independently observed classification case.

## Source labels and preparation masks have different jobs

The [official Donut workflow](https://raw.githubusercontent.com/NetManAIOps/donut/master/README.rst) passes values and labels together through timestamp completion, then keeps missing indicators for training and evaluation preparation. This is an implementation example, not proof that every competition protocol uses identical splits.

Keep original labels separate from missingness. If no anomaly label is available, a placeholder label should not be interpreted as independently established normality. Record which information the selected training procedure excludes when fitting normalization.

## Inspect each stream around its gaps

Use a short input with recoverable source coordinates and an absent interval. Verify completed timestamps, reordered values, labels, and the returned mask together. Preserve original stream identity when merging outputs into a result table.

The [data identity guide](/journal/data-guide-coco-instance-caption-identities/) explains that final join. Correct completion supports a defined preparation pipeline; it does not reconstruct unobserved metric values, demonstrate anomaly accuracy, or make a model's example protocol interchangeable with every competition stage.
