---
library: "bootstrap"
slug: "DriftWatch"
name: "DriftWatch"
ref: "DriftWatch#2913"
hash: "sema:DriftWatch#mh:SHA-256:29131d6f9346a5c367020dd9251cbf8a1401c46b0118c2e58c20f152fbb72f95"
type: "Protocols"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/DriftWatch"
---

# DriftWatch

Reputation scoring via behavioral deviation from baseline (2-sigma alert)

Society · Protocols

## Mechanism

Reputation via micro-deviation detection. 1. Baseline: establish behavioral frequency over `window_size` samples. 2. Sample: continuous high-resolution observation. 3. Detect: alert when [Distance](https://semahash.org/vocabularies/bootstrap/patterns/Distance.md)(Current, Baseline) exceeds `threshold`. 4. Witness: aggregated peer reports. Tracks behavioral consistency against a baseline [Aggregate](https://semahash.org/vocabularies/bootstrap/patterns/Aggregate.md) of historical actions.

## Invariants

- Baseline is immutable while a sample is judged against it.
- Baseline recomputation interval and source window are declared.
- Alert when [Distance](https://semahash.org/vocabularies/bootstrap/patterns/Distance.md)(Current, Baseline) > `threshold`, in the units [Distance](https://semahash.org/vocabularies/bootstrap/patterns/Distance.md) returns.

## Parameters

- threshold: type=Float, range=[0.0, inf), description=Trigger in the units [Distance](https://semahash.org/vocabularies/bootstrap/patterns/Distance.md) returns — not normalised, not sigma multiples.
- window_size: type=Integer, range=[10, 10000], description=Samples forming the baseline
- recompute_interval: type=Integer, range=[0, 100000], description=Samples between baseline rebuilds; 0 pins it permanently.

## Preconditions

- Baseline state is established

## Failure modes

- Baseline walked: the subject changes more slowly than the baseline recomputes, so no alert fires.
- Witness collusion: coordinated false drift reports.
- False reports: a single malicious witness.
- Cold start: no baseline yet, so the watcher is silent through the establishment window.
- Baseline gaming: [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) varies early to establish a wide baseline.
- Alert flood: continuous sampling against a sensitive threshold alerts at its false-positive rate.

## Where this came from

—

## Builds on

- [Aggregate](https://semahash.org/vocabularies/bootstrap/patterns/Aggregate.md) (references)
- [Distance](https://semahash.org/vocabularies/bootstrap/patterns/Distance.md) (references)
- [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) (references)

## Used by

- [RegimeSense](https://semahash.org/vocabularies/bootstrap/patterns/RegimeSense.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: DriftWatch#2913
- Hash: sema:DriftWatch#mh:SHA-256:29131d6f9346a5c367020dd9251cbf8a1401c46b0118c2e58c20f152fbb72f95

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/DriftWatch
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/DriftWatch.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
