Skip to main content

Module dsa

Module dsa 

Source
Expand description

DSFB-Debug: Deterministic Structural Accumulator (DSA) — paper §5 and Appendix D.

The DSA is the running scalar score that aggregates five rolling structural features into a single value the policy engine consumes:

DSA(k) = w1·boundary_density(k)
       + w2·drift_persist(k)
       + w3·slew_density(k)
       + w4·ewma_occupancy(k)
       + w5·motif_recurrence(k)

Default weights are unit (w_i = 1.0), reproducing the paper’s reference scoring. Operators tuning per-site can adjust weights via the EngineConfig (see config.rs).

The DSA score is one input to the PolicyState decision in policy.rs; higher scores escalate from SilentWatchReviewEscalate. The score is a pure function of its inputs; Theorem 9 deterministic replay holds trivially.

Functions§

compute_dsa_score
Compute DSA score from rolling features. Unit weights (all w=1.0).
consistency_gate
Check DSA directional consistency gate Returns true if DSA score >= τ