Skip to main content

Module complexity

Module complexity 

Source
Expand description

Information-theoretic complexity estimation (MDL/Kolmogorov framing). Quantifies how well the nominal model describes the current residual trajectory. Information-theoretic complexity estimation for residual trajectories.

§Theoretical Basis: Minimum Description Length (MDL)

DSFB can be framed as an Online Kolmogorov Complexity Estimator operating under the Minimum Description Length (MDL) principle. The core insight:

  • A residual trajectory from a healthy system is compressible: it can be described as “Gaussian noise with parameters (μ, σ)” — a short description.
  • A residual trajectory undergoing structural change is incompressible under the nominal model: the excess description length signals that the residual has left the ergodic regime of the nominal model.

A grammar state of “Violation” corresponds to an un-modeled innovation that collapses signal ergodicity — the residual trajectory can no longer be efficiently described by the calibration-window model.

§Practical Implementation

We estimate trajectory complexity via a windowed normalized entropy metric rather than true Kolmogorov complexity (which is uncomputable). The NormalizedComplexity score measures how much the residual trajectory’s distribution deviates from the calibration-window distribution, using a histogram-based entropy estimator.

§Relationship to DSA Score

The complexity score provides an information-theoretic anchor for the DSA:

  • Low complexity → trajectory is well-described by the nominal model → Admissible
  • Rising complexity → the nominal model is losing descriptive power → Boundary
  • High complexity → the nominal model cannot describe the trajectory → Violation

§Design

  • no_std, no_alloc, zero unsafe
  • Fixed-capacity histogram [u16; BINS]
  • O(1) per observation (bin update + entropy re-estimate)

Structs§

ComplexityEstimator
Windowed complexity estimator using normalized entropy.
ComplexityResult
Result of a complexity estimation.
PermEntropyResult
Result of a permutation entropy computation.
PermutationEntropyEstimator
Permutation Entropy (PE) estimator for order m=3 (six ordinal patterns).

Enums§

ComplexityRegime
Qualitative complexity regime.
PermEntropyRegime
Qualitative regime for normalized permutation entropy.

Functions§

ordinal_pattern_3
Classify the ordinal pattern of a triplet (a, b, c) into one of 6 indices.