Skip to main content

Vigil (vigil-drift)

Unsupervised Drift & Novelty Monitoring for Tabular Network Streams with Decomposed & Permutation-Calibrated Copula-KS Attribution.

PyPI (vigil-drift) · Project Site · GitHub Repository · Research Status · Calibrated Attribution Study


Overview

Vigil extends the dual-autoencoder open-world drift and novelty detection framework (arXiv:2605.29834) with Decomposed Copula-KS Attribution (Vigil(attribution_mode="decomposed")) and Permutation-Calibrated Edge-Peeling Attribution (Vigil(attribution_mode="calibrated")), label-free feature localization engines for non-stationary, heavy-tailed network traffic streams.

Key Empirical Findings & Methodological Solution

  1. Autoencoder Attribution Dichotomy (final-mechanism-decision-2026-09-28.md): Across 40 seeds on synthetic and CICIDS2017 network flows, training a bottleneck autoencoder substantially improves localization of multi-feature dependency shifts (10.0% → 97.5% Recall@3), but degrades small univariate mean-shift localization (57.5% untrained → 32.5% trained vs. 100.0% KS) due to bottleneck pass-through and cross-feature decoder error smearing.
  2. Decomposed & Permutation-Calibrated Copula-KS Attribution (calibrated-attribution-study-2026-10-24.md): Fast decomposed mode (7.6 ms median at d=20, n=400) pairs Bonferroni-scaled Kolmogorov-Smirnov marginal log-evidence with within-window van der Waerden rank-normal (Φ⁻¹(rank / (N + 1))) Fisher-z relational shifts, achieving 100.0% Recall@3 on dense CICIDS2017 univariate shifts and 1.000 MRR on column permutations. Because asymptotic Fisher-z thresholds over-reject on zero-inflated, tied, and non-Gaussian copula telemetry (57.8%–59.0% false-alarm rate on unchanged CICIDS2017 windows, 82.6% on normal-only NSL-KDD), opt-in calibrated mode (0.30–0.38 s median at d=20, n=400, B=199) applies pooled Westfall–Young max-statistic permutation calibration with an α/2 family split and greedy edge peeling—restoring FWER to 3.2%–5.8% (3.4% on NSL-KDD) on exchangeable windows while lifting two-feature permutation Recall@3 from 65.0% to 95.0%.
  3. Continuous Streaming Detection (Vigil): Fixes post-drift warm-up blindness and pre-adaptation error buffer desynchronization, achieving 100.0 ± 0.0% precision, 97.9 ± 1.9% F1 (verified_only, frozen reference) and 89.9 ± 2.9% F1 (auto), and a 1.0-chunk detection delay on a 5-seed, 50-chunk NSL-KDD continuity check (note: 5 negative chunks; an always-alarm rule scores 94.7% F1).

Quick Start

pip install vigil-drift
from vigil import Vigil

sentinel = Vigil(
    feature_names=feature_names,
    top_k_features=5,
    attribution_mode="calibrated",   # 'calibrated', 'decomposed', 'positive_delta', 'absolute_delta', 'standardized_delta'
    adaptation_mode="verified_only", # 'verified_only' / 'frozen' (non-adaptive), or 'auto'
    n_permutations=199,
    seed=42,
)
sentinel.fit(baseline_normal_data)

for batch in stream:
    result = sentinel.detect(batch)
    if result.drift_detected and result.attribution:
        for feat in result.attribution.top_features:
            print(f"{feat['feature_name']} ({feat['drift_type']}): {feat['contribution']:.1%}")

Scope & Boundaries: Real-data attribution benchmarks on CICIDS2017 inject controlled shifts into reserved Tuesday validation and Wednesday–Friday held-out test flows standardized strictly by Monday training statistics. Recall@3 and MRR measure localization of perturbed feature indices rather than supervised intrusion classification or causal discovery, and permutation p-values require exchangeable rows within a window (or contiguous block permutations via block_size > 1 when local serial dependence is short).

License

MIT License. See LICENSE.

Metadata

Release files for vigil-drift 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vigil-drift 0.1.5
File Size Uploaded Provenance Actions
vigil_drift-0.1.5.tar.gz 140.0 kB Without provenance Details for vigil_drift-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vigil-drift 0.1.5
File Interpreter ABI Platform Actions
vigil_drift-0.1.5-py3-none-any.whl Python 3 none any Details for vigil_drift-0.1.5-py3-none-any.whl

Total release size: 297.4 kB

Release files / vigil_drift-0.1.5.tar.gz

Download URL vigil_drift-0.1.5.tar.gz
Size 140.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bda58ea0db5190b149bd8a94131c3dbb518a5fc91d7a1b6ca17e2be2bbcc4ad2
BLAKE2b-256 checksum
How to use checksums
c5605f5e10c77d6c0500813c07626690279fe35f4ab71a55ecfad0e9070c2ece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / vigil_drift-0.1.5-py3-none-any.whl

Download URL vigil_drift-0.1.5-py3-none-any.whl
Size 157.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4078844a942f9b47357159fe5e1cff9f1feca969dff5bef64e4c08d7f6fbe365
BLAKE2b-256 checksum
How to use checksums
82109a6f590218d5317a412d34781796b6a8241c15da9811e7beada16055cdd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for vigil-drift 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page