Open-source drift monitoring

Observe
the shift.

When your data changes, take a closer look. Vigil combines label-free monitoring with feature-error diagnostics and reproducible evaluation.

pip install vigil-drift · PyPI ↗

VIGIL / SIGNAL VIEWILLUSTRATION
Reconstruction error
A change worth inspecting.
Illustrative change in reconstruction error A low, steady signal rises in a later window. This is a schematic, not measured performance. inspect window
REFERENCECURRENT WINDOW

Diagnostic scores. Not causal explanations.

SCHEMATIC ONLY · No live traffic or measured results shown.
Built for exploration.Python + PyTorchLabel-free inferenceMIT licensedResearch prototype

01 / The system

From changing data
to inspectable signals.

A Python package for monitoring numeric feature streams. The components expose signals for investigation—not automated security verdicts.

  1. 01 / PREPARE

    Establish a reference

    Fit preprocessing on training data. Keep feature order consistent across numeric batches.

  2. 02 / RECONSTRUCT

    Compare representations

    Adaptive and frozen autoencoders provide reconstruction-error signals.

  3. 03 / MONITOR

    Look for change

    Replicated statistical tests and KDE novelty scores flag batches for investigation.

  4. 04 / ATTRIBUTE

    Decompose & calibrate

    Separate marginal (KS) and relational (Gaussian-copula) feature shifts, with opt-in permutation edge peeling.

Example integrations
Serving, ingestion, tracking and orchestration—not validated production deployments.

FastAPIKafkaMLflowAirflowStreamlitDocker Compose

02 / Research evidence

Diagnose the dichotomy.
Calibrate the attribution.

Does learning a bottleneck autoencoder improve feature localization? Our 40-seed study uncovered a sharp regime dichotomy between marginal and relational shifts—and our follow-up calibration study added exact Westfall–Young permutation FWER control and greedy edge peeling.

40-Seed Benchmark / Val + Held-Out Test

40Evaluation seeds
12Ranking methods
18Synthetic conditions
6CICIDS2017 conditions

20 validation seeds (Tuesday) + 20 untouched held-out test seeds (Wednesday–Friday) on CICIDS2017 flows. Recall@3 and MRR measure recovery of injected feature indices, not supervised attack recall.

Key Finding / Decomposed & Calibrated Copula-KS

100% Univariate Recall@3.
95.0% Permuted-Pair Recall@3 with Peeling.

Training a bottleneck autoencoder improves relational dependency localization (10.0% → 97.5% Recall@3) but harms small univariate mean-shift localization (57.5% untrained → 32.5% trained) due to bottleneck pass-through and error smearing.

Decomposed Copula-KS pairs marginal KS log-evidence with van der Waerden rank-normal (Gaussian copula) Fisher-z relational evidence in 7.6 ms median on CPU (d=20, n=400). Opt-in calibrated mode adds Westfall–Young max-statistic permutation calibration and greedy edge peeling—restoring null FWER on exchangeable CICIDS2017 flows from 57.8%–59.0% to 3.2%–4.4% and lifting permuted-pair Recall@3 from 65.0% to 95.0% (0.30–0.38 s at B=199).

Calibrated peeling study · 40-seed Copula-KS study · Phase I mechanism diagnosis
Study boundaries & interpretation
  • Controlled two-feature perturbations on reserved CICIDS2017 validation and held-out test flows standardized strictly by Monday baseline traffic.
  • Permutation FWER calibration holds for exchangeable rows; non-exchangeable recorded packet order requires block or pre-whitened baselines.
  • Feature rankings localize distributionally shifted features (marginal vs. relational); they are not formal interventional causal explanations.
  • On 5-seed NSL-KDD streaming evaluation, Vigil achieves 97.9 ± 1.9% F1 (verified_only) and 89.9 ± 2.9% F1 (auto) with 100.0% precision and 96.7 ± 3.0% novel-class recall.

Selected 40-seed evaluation results (Mean Recall@3 % and MRR)

Recall@3 is the percentage of the two perturbed feature indices recovered in the top three rankings across 20 validation seeds (50–69) and 20 untouched held-out test seeds (70–89).

Mean Recall@3 (%) and MRR · 20 Validation + 20 Held-Out Test Seeds
ConditionDecomposed Copula-KS (Ours)Trained AE (|Δ|)Univariate KSPearson Corr.
Synthetic small mean shift (+0.5 SD, Val)100.0% (1.000)32.5% (0.508)100.0% (1.000)7.5% (0.217)
Synthetic dependency shift (bg=0.3, +0.6, n=800, Val)100.0% (1.000)97.5% (0.967)15.0% (0.282)100.0% (1.000)
CICIDS2017 small mean shift (+0.5 SD, Held-Out Test)100.0% (1.000)7.5% (0.199)100.0% (1.000)17.5% (0.289)
CICIDS2017 column permutation (Val / Held-Out Test)65.0% / 55.0% (1.000 MRR)27.5% / 17.5%15.0% / 17.5%65.0% / 67.5% (0.700 MRR)

See the full 40-seed Decomposed Copula-KS report, frozen protocol, and Phase I mechanism diagnosis.

03 / Get started

Start with
your baseline.

Supply finite numeric arrays with consistent columns. Calibrate thresholds and evaluate on your own task before relying on an alert.

Source setup & documentation ↗

PYTHON / BASIC USAGEvigil-drift
# pip install vigil-drift
from vigil import Vigil

# Provide your preprocessed data and column names.
monitor = Vigil(feature_names=feature_names)
monitor.fit(baseline_data)

for batch in stream:
    result = monitor.detect(batch)

    if result.attribution is not None:
        for feature in result.attribution.top_features:
            print(feature["feature_name"],
                  feature["contribution"])

Contributions are normalized drift-evidence scores (marginal KS vs. relational copula)—not causal explanations or probabilities of input change.