Architecture

The Kernel Pipeline

METASTATE is one variational agent. A signal stream enters, a single free-energy functional is minimised across three coupled terms, and the system emits diagnostics: per-channel surprise, causal coherence, and a closed-form description of structure. Below is the full data path, end to end.

F = Eq[−log p(s|η,m)]  +  DKL[ q(η|μ) ‖ p(η|m) ]  +  λ·depth(EML)

Signal flow

M1 · Ingest text · audio · ECG telemetry M2 · Preprocess STFT · embed tokenise M3 · Temporal Prior TimesFM 2.5 ACCURACY TERM M4 · Process Matrix recognition density COMPLEXITY · 𝒞(t) M5 · EML Head symbolic regression STRUCTURE TERM M6 · Free-Energy F = acc + KL per channel M7 · Flagger F > F*, 𝒞 > 𝒞* universal sigs Out JSON diag. M8 · ACTIVE INFERENCE — selects next intervention by expected free energy

The three terms

Accuracy

−Eq log p(s|η,m). A TimesFM-class generative prior forecasts the ordinary stream; the negative log-likelihood of the residual is surprise. High surprise = the prior cannot explain the data.

Complexity

DKL[q‖p]. A process-matrix recognition density parametrises cross-temporal correlations and admits indefinite causal order. When the data force a non-separable fit, 𝒞(t) > 0.

Structure

λ·depth(EML). The Odrzywołek operator eml(x,y)=eˣ−ln y builds a tree whose depth is penalised — recovering minimum-description-length closed forms for residual structure.

What the console returns

/v1/anomaly/scorefree_energy, causal_coherence, ar1_phi, and the universal signatures: Zipf α, conditional entropy H₁, gzip compression ratio, spectral β. A window is flagged when it sits in the joint tail (high surprise and high coherence).

/v1/symbolic/regressexpression, depth, residual, complexity_penalty, and a decipherable boolean. Low-depth, low-residual fits indicate organised structure; high-depth fits indicate the basis is wrong or the signal is incompressible.

Universal signatures (§6.1)

Zipf α ≈ 1

Rank-frequency power law. Human language and many animal systems are Zipfian. Its presence marks a candidate for organised information.

Conditional entropy

Hn decreasing with order n at a structured rate reflects long-range correlation — distinguishing language from memoryless noise.

Compression ratio

Organised information compresses below its raw size under gzip/zstd; pure noise does not. Bounded above by the entropy rate.

Spectral β ≈ 1

Pink-noise self-similarity of music and speech. β≈0 is thermal, β≈2 is Brownian; anomalous β outside the natural range is notable.

Causal coherence 𝒞(t)

Cross-temporal mutual information a definite-order model cannot absorb — the empirical analogue of a causal-inequality violation.

Free-energy F

The anomaly score itself. Reported decomposed into accuracy and complexity so a "cannot-fit" signal is distinguished from a "fits-only-with-elaborate-structure" signal.

← back to console