RayveLabs — research extension Lab 6 · Beyond Twin Authority
RayveLabs original · extends SEAS-8414 Ch 6 Ex 11

His Exercise 11 ends on a finding. This closes it.

Chapter 6 proves that KL and Jensen-Shannon divergence are blind to the small, targeted changes that actually invalidate a remediation decision — and stops there. Two contributions pick it up: a structural drift detector that catches every material change divergence misses, and a value-of-information authority rule that replaces the heuristic Twin Authority Gate with an explicit Act / Resync / Block decision under uncertainty.

RayveLabs teaching + research demo, fully client-side, synthetic dependency graph. Builds on Dr. Mallarapu's SEAS-8414 Chapter 6 (© Dr. Mallarapu / GWU) — it does not reproduce it.

The gap

Why divergence fails — and what kind of metric won't

KL/JS measure the magnitude of a distribution shift. A single firewall rule, one swapped dependency, or one profile downgrade changes almost no aggregate distribution — so divergence reads ~0 while the decision is now unsafe. The fix is not a better distribution test; it is a metric over structure and evidence: a typed diff of the twin's dependency graph plus a predicate for "does the change touch the remediation path or a safety-critical asset?" That metric is never zero for a real change.

Distributional (KL / JS) — his Ex 11
material changes detected, of 8
Structural + evidence — this work
material changes detected, of 8
Contribution 1

Structural drift detector (typed graph-edit-distance + path predicate)

Inject the same eight controlled drift scenarios from Exercise 11. For each, compare what distributional divergence sees against the structural score (weighted typed graph edits: node ±3, edge ±2, attribute/firewall/service ±1) and the decisive path/critical-touch predicate.

Inject drift

Dependency graph — remediation path in teal, critical in violet

No drift injected — twin matches scan.

Detection comparison

drift scenarioJSKL/JS detect?struct Δ (GED)touches path?companion metricdetector verdict

Figure (RayveLabs): The structural score is small for targeted changes — but small ≠ zero, and the path predicate makes materiality explicit. "Small change, big consequence" becomes visible.

Contribution 2

Value-of-Information authority — replace the checklist with a decision

The Twin Authority Gate is a heuristic table. Make it a decision under uncertainty: choose the action that minimises expected cost. Let p = probability the twin is wrong for this decision (raised automatically by the structural detector above). Then compare acting now, blocking, and resyncing to buy evidence.

Cost model

Decision

p (twin wrong for this decision)
E[Act now] = p·C_wrong
E[Resync] = C_resync + p′·C_wrong
E[Block] = C_delay
Recommended:
Mapped to his verdict:

Figure (RayveLabs): As p rises, the rule crosses Act → Resync → Block. Resync wins only when information is cheap relative to the error it removes — a formal expression of "buy evidence before you act."

Summary

How this upgrades Chapter 6

Chapter 6 (as taught)This extensionWhat students gain
KL/JS divergence flags driftTyped structural diff + path/critical predicateCatches the 6/8 targeted changes divergence misses
Twin Authority Gate (checklist)Value-of-information decision ruleA defensible Act/Resync/Block, not "use judgment"
"Drift can be invisible" (finding)"Here is the metric that sees it" (contribution)Turns a critique into a method
Verdict stated qualitativelyVerdict derived from cost + measured errorSensitivity analysis: when does the verdict flip?
Research seed. The structural detector + VoI rule is a small, real paper: "Distributional drift metrics are insufficient for digital-twin remediation authority; a typed structural detector with a value-of-information stopping rule provides per-decision validity." Synthetic-graph results here; the next step is evaluating it against real Breakwater twin logs.