Skip to main content

Arc Vigil — neural network training stability monitor. Detect, attribute, intervene.

Project description

Bendex Vigil

Detect. Attribute. Intervene.

Real-time neural network training stability monitoring grounded in information geometry.

License Python PyTorch


What it does

Vigil monitors your training run in real time, identifies which layer is failing, and corrects it automatically — before your loss curve shows anything.

Vigil Loss spike Gradient norm Patience
Detection rate 100% 100% 90% 100%
False positive rate 0% 80% 50% 50%
Recovery rate 90% 0% 0% 0%
Attributes module Yes No No No
Intervenes automatically Yes No No No

30-seed benchmark across 7 architectures: MLP, CNN, ViT, DistilBERT, GPT-2, ResNet-50, distribution shift.


How it works

Vigil treats your model's weight trajectory as a geometric object and computes discrete curvature over it:

k_t = |d_t - 2*d_{t-1} + d_{t-2}|

where d_t is the normalized per-module weight divergence from a reference checkpoint. During healthy training, k_t stays near zero. At instability onset it spikes — well before loss diverges.

Two detection channels run in parallel:

  • AND mode — divergence step-change AND gradient energy both persistently exceed their z-scored baseline
  • Kappa mode — curvature alone persistently exceeds its z-scored baseline

When a trigger fires, the deepest-early-cluster attribution algorithm identifies the specific module that deviated first. A three-phase intervention then fires automatically.


Install

pip install bendex-vigil

Or from source:

git clone https://github.com/hannahnine/bendex-vigil
cd bendex-vigil
pip install -e .

Usage

One call. Before your forward pass.

from bendex import BendexMonitor, BendexConfig, BendexIntervention

monitor = BendexMonitor(model, config=BendexConfig())
intervention = BendexIntervention(model, optimizer)

for step, batch in enumerate(dataloader):
    event = monitor.observe(step)          # before forward pass
    intervention.step(event, step)

    loss = model(batch)
    loss = loss + intervention.logit_loss(logits)
    loss.backward()
    intervention.apply_grad_clip()
    optimizer.step()
    optimizer.zero_grad()

See examples/basic_usage.py for a complete working example.


Configuration

config = BendexConfig(
    warmup_steps=60,     # steps to collect baseline before detection starts
    z_threshold=2.5,     # z-score threshold for detection
    persist=2,           # consecutive steps signal must exceed threshold
    max_lag=6,           # attribution temporal window
)

Validated architectures

  • Multilayer perceptron (MLP)
  • Convolutional neural network (CNN)
  • Small Vision Transformer (ViT)
  • DistilBERT 66M — SST-2, 30-seed benchmark
  • GPT-2 117M — WikiText-2 fine-tuning
  • ResNet-50
  • Distribution shift benchmark (SST-2 → MNLI)

Research

Vigil is the applied proof of a theoretical program in information geometry. Five published papers:

  1. Informational Curvature
  2. Informational Stability
  3. Reflexivity
  4. Experience
  5. Specialization — derives the fine structure constant α to 8 significant figures from pure geometry

License

Source available. Free for research and non-commercial use. Commercial license required for all other use.

See LICENSE for full terms.

Patent pending. Methods covered by provisional patent applications filed by Hannah Nine / Bendex Geometry LLC (priority dates November 2025, February 2026, March 2026).

For commercial licensing: 9hannahnine@gmail.com · bendexgeometry.com


Author

Hannah Nine — bendexgeometry.com · ORCID 0009-0006-3884-7372

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arc_vigil-1.0.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arc_vigil-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file arc_vigil-1.0.0.tar.gz.

File metadata

  • Download URL: arc_vigil-1.0.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for arc_vigil-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d2572787bce07f57693b460fb84e371fca1e8cc3b58c4783eb05b80c997ff895
MD5 719ba51dadfb8db7ad0f237ee0c29142
BLAKE2b-256 95b6fa3fda0deadde6ce3ae20bf0aa6f3f4c5372de4dc07da98a41225412add1

See more details on using hashes here.

File details

Details for the file arc_vigil-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: arc_vigil-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for arc_vigil-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18343abc2e79b9021410fc34605605d970bea7bc0c5cb8f3e33f9ae36451bf20
MD5 14eb09cca5f5026f1bb4217fc06dd664
BLAKE2b-256 031601ea09edba9366e4ebe29193beb7fe2abf16cf609fdb70820dd14924e62c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page