Skip to content

[Kumo-Anomaly 3/n] Add KumoAnomaly reconstruction and scoring - #1210

Merged
aw471 merged 0 commit into
aw471/kumo-anomaly-4-targetless-iclfrom
aw471/kumo-anomaly-5-model
Oct 20, 2026
Merged

aw471 merged 0 commit into
aw471/kumo-anomaly-4-targetless-iclfrom
aw471/kumo-anomaly-5-model

Conversation

@aw471

@aw471 aw471 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fills in the KumoAnomaly boilerplate from #1202 with the Kumo-Anomaly conditional diffusion reconstruction. KumoAnomaly is a Model (#1198): model(x, reference=None, *, recipe=None, num_samples=15, num_steps=20, generator=None) scores each row of x, with rows as ordered time steps. Weights are randomly initialized here; loading the pretrained checkpoint follows later in this stack.

  • Preprocessing (recipe.features) is fitted on reference, or on x itself when reference is None (transductive scoring, as in the SDK). The default recipe casts features to float64, min-max scales them, and casts to float32, as Kumo-TS preprocesses in double precision.
  • The output is a TableTensor with one numerical "score" column: the per-row mean absolute reconstruction error over the input features in preprocessed space.
  • Rows are split into windows of 100 time steps; the final partial window is padded by repeating its last row, then trimmed, as in the SDK. Features are zero-padded to the checkpoint width of 40; wider inputs raise for now.
  • Each window is normalized by its scalar mean and standard deviation. Four alternating blocks are reconstructed under two complementary masks with the DPM-Solver++ sampler, and the lower median over num_samples draws per mask (default 15, as in the SDK's perform_anomaly_analysis_with_diffusion; num_steps=20) gives the reconstruction. Windows run in chunks of 32, and noise is drawn from the supplied generator in the reference order.

With identical random weights and the same generator, scores match the KumoAnomaly from #1167 within float32 rounding (series [250, 5], num_samples=3, num_steps=5: max abs diff 1.2e-7, max rel 2.1e-7; #1167 scales in float32).

Source: Kumo-TS inference_ad_tesseract2: windowing in _build_window_tensor, complementary masks in _create_mask, per-window scaling in _normalize_observed_data, sampling in evaluate_with_dpm, and the median and residuals in combine_samples_and_compute_residuals.

The implementation comes from Aditi Gautam's model.py in #1167, adapted to the Model interface.

Parent: #1208.

@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@aw471
aw471 merged commit 3d184cc into aw471/kumo-anomaly-4-targetless-icl Oct 20, 2026
@aw471
aw471 force-pushed the aw471/kumo-anomaly-4-targetless-icl branch from 85b8ee6 to cf95c41 Compare October 20, 2026 17:53
@aw471
aw471 deleted the aw471/kumo-anomaly-5-model branch October 20, 2026 17:53
@aw471
aw471 force-pushed the aw471/kumo-anomaly-5-model branch from 9eef618 to 3d184cc Compare October 20, 2026 17:53
@aw471 aw471 changed the title [Kumo-Anomaly 4/8] Add KumoAnomaly [Kumo-Anomaly 3/n] Add KumoAnomaly reconstruction and scoring Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant