Deviation Function D=(N-T)/(ExS)

by Nick Clark | Published March 27, 2026 | PDF

Deviation from the integrity envelope is not an event detector and not a learned signal. It is a computed function — deterministic, bounded within a closed interval, and reproducible from the canonical fields and policy reference alone. The deviation magnitude produced by the function governs the severity of the architecture's response, mapping linearly onto rate limits, scope contractions, and escalation triggers, so that small deviations produce small corrections and large deviations produce structural responses without any intermediate heuristic stage.


Mechanism

The deviation function is defined in Chapter 3 of the cognition patent as a closed-form mapping from the per-domain residual vector emitted by the three-domain integrity envelope, modulated by the experience and self-esteem signals from the lineage and self-esteem-class fields, to a bounded scalar deviation magnitude. The canonical form is D = (N − T) / (E × S), where N is the declared normative target supplied by the policy reference, T is the trajectory value computed from the agent's recent action lineage, E is an experience weight derived from the lineage's depth and density in the relevant action class, and S is the self-esteem scalar published by the self-esteem-class field. The numerator captures the gap between norm and trajectory; the denominator scales the gap by the agent's accumulated competence-context, so that the same nominal gap produces a larger deviation magnitude for an inexperienced or poorly calibrated agent than for an experienced and well-calibrated one.

The function is evaluated on every action cycle, after the three-domain envelope has reported but before the action is committed. The evaluation is purely arithmetic: no learned components, no probabilistic sampling, no externally fetched state. Given the same inputs, the function produces the same output on every invocation, on every substrate, in every jurisdiction. The output is bounded by a saturating mapping that clamps the raw quotient into a closed deviation interval, ensuring that pathological denominator values (very small E, very small S) cannot produce unbounded magnitudes that would overwhelm downstream consumers.

The deviation magnitude is published to the agent's integrity field and recorded in the lineage. Downstream primitives consume the magnitude through declared interfaces: confidence governance reduces published confidence in proportion to the magnitude, discovery traversal contracts the admissible-action set in proportion, and the response-severity primitive selects from a graded escalation ladder indexed by the magnitude band. Because the mapping is closed-form and the bands are policy-declared, the action the architecture takes in response to any given deviation is fully predictable from the inputs.

Operating Parameters

The function is parameterized along several axes. The normative-target source declares which policy values constitute N for a given action class; some deployments draw N from a static policy reference, others from a dynamically negotiated obligation set, others from a chained commitment graph. The trajectory-aggregation kernel declares how the lineage is reduced to T; common kernels include exponentially decayed means, fixed-window medians, and policy-weighted sums over the per-domain residual vector. The experience-weight function declares how the lineage's depth and density map to E; deployments may use raw counts, density-corrected counts, or attestation-weighted counts.

The self-esteem scalar S is supplied directly by the self-esteem-class field, but the function exposes a clamping parameter that floors S at a minimum value to prevent the under-confidence regime from producing artificially inflated deviation magnitudes that would over-correct a merely cautious agent. The saturating mapping that clamps the raw quotient is parameterized by its saturation threshold, which deployments tune to balance sensitivity at small deviations against stability at large ones. The escalation-ladder bands are declared by the policy reference and may be coarse (three or four bands) or fine (a dozen or more), depending on how granular the deployment requires the architecture's response to be.

Each parameter is policy-versioned and recorded in the lineage on every evaluation. An audit conducted years after the fact can reconstruct the exact deviation surface against which the agent was operating at any moment, which kernel reduced its lineage, which experience function weighted the denominator, and which escalation band a given magnitude fell into.

Alternative Embodiments

The canonical form D = (N − T) / (E × S) is the primary embodiment. Several alternatives preserve the deterministic, bounded, reproducible structure while varying the functional form. A vector-valued embodiment computes a deviation per integrity domain rather than a single scalar, producing a deviation vector aligned with the per-domain residuals from the three-domain envelope; the response-severity primitive then selects domain-specific escalations rather than a single graded response. A signed embodiment retains the sign of (N − T), distinguishing trajectories that fall short of the norm from trajectories that exceed it, which matters in deployments where exceeding a norm (over-cautious behavior, over-restrictive scope) is itself a deviation worth correcting.

A multi-horizon embodiment evaluates the function at multiple forecast horizons supplied by the forecasting primitive, producing a deviation curve over time rather than a point magnitude; the response-severity primitive then selects an escalation that is appropriate not only to the current deviation but to the projected deviation trajectory. A composite-denominator embodiment generalizes E × S into an arbitrary policy-declared scaling function over the lineage state, allowing deployments to incorporate additional context — for instance, environmental volatility, peer-agent disagreement, or external risk signals — into the denominator without altering the structural shape of the function.

Each alternative retains the closed-form, deterministic, bounded character of the primary embodiment. None of them introduces learned components or probabilistic sampling into the deviation evaluation itself, though learned components are permitted upstream in the production of N, T, E, or S provided that those upstream values are themselves recorded in the lineage at the moment of evaluation.

Composition with Other Primitives

The deviation function is downstream of the three-domain integrity envelope, the lineage primitive, and the self-esteem-class field, and upstream of confidence governance, discovery traversal, and response severity. The composition is strict: the function cannot be evaluated until the three-domain envelope has reported its per-domain residuals, until the lineage has been queried for the trajectory aggregate and the experience weight, and until the self-esteem-class field has published its scalar. Because each upstream primitive is itself deterministic, the function inherits determinism transitively from the canonical fields all the way through to the action commit point.

The function is the principal interface between integrity sensing and integrity response. Without it, the architecture has detection but not graded response; rule-based systems that act on deviation typically choose between commit-and-warn or block-entirely, with no structural way to scale response to magnitude. The function provides the missing scalar, and the lineage recording of every evaluation provides the audit trail that licensees and regulators require.

Coupling with the response-severity primitive is band-indexed rather than continuous. The escalation ladder partitions the bounded deviation interval into a finite set of bands, each associated with a declared response — increased verbosity in published outputs, narrowed admissible-action set, mandatory consultation of an external attestor, hard refusal, or escalation to a human principal. The band index is the canonical interface; the response-severity primitive is replaceable without altering the deviation function, and the deviation function is replaceable without altering the response-severity primitive, provided both honor the band-index contract. This separation is what permits deployments in different domains — clinical, industrial, conversational, financial — to share the same deviation function while wiring entirely different escalation ladders behind it.

Distinction Over Prior Art

Prior systems compute deviation in two predominant ways, both of which differ structurally from the disclosed function. The first class of prior systems uses learned anomaly detectors — autoencoder reconstruction error, density-estimation likelihoods, classifier confidence — to flag deviation; these systems are non-deterministic across model revisions, opaque to audit, and provide no closed-form mapping from deviation to response severity. The second class uses hand-coded rule violations as deviation events; these systems are binary rather than graded, cannot scale response by magnitude, and cannot incorporate experience or self-esteem context into their evaluation.

The disclosed function is neither learned nor binary. It is closed-form, graded, deterministic, bounded, and explicitly parameterized by experience and self-esteem in the denominator, producing a context-sensitive deviation magnitude that no learned anomaly detector and no rule-based system in the available literature provides. The lineage-recorded, policy-versioned parameter regime is itself novel: prior deviation evaluators do not record the parameters under which they evaluated, making post-hoc reconstruction of decision surfaces impossible. The disclosed function records, by construction, every parameter in force at every evaluation.

Disclosure Scope

The disclosure covers the canonical form D = (N − T) / (E × S), the saturating bounded mapping that clamps the raw quotient, the policy-versioned parameter regime governing N source, T kernel, E function, S clamping, saturation threshold, and escalation-ladder bands, the lineage recording of every evaluation including its parameters, and the alternative embodiments enumerated above including the vector-valued, signed, multi-horizon, and composite-denominator variants. The disclosure further covers the strict composition with the three-domain envelope, the lineage primitive, and the self-esteem-class field upstream, and with confidence governance, discovery traversal, and response severity downstream. Implementers operating a deviation evaluator that is closed-form, deterministic, bounded, parameterized by experience and self-esteem, and policy-versioned with lineage recording are operating within the scope of the disclosure regardless of the specific functional form chosen, the specific kernels used, or the specific substrate on which the evaluator runs.

The disclosure extends to deployments in which the deviation magnitude is exported as a regulatory artifact, with the lineage-recorded parameter regime serving as the basis for compliance attestation. It extends to multi-agent fleet deployments in which deviation magnitudes are exchanged among peers as compact representations of operational state, allowing the fleet to coordinate response severity collectively without requiring each agent to share its full lineage. It extends to deployments in which the function is evaluated speculatively against hypothetical action candidates as part of a planning loop, with the speculative evaluations recorded as such in the lineage and distinguished from committed-action evaluations. It extends to safety-critical deployments in which the saturating mapping is replaced with a hard rejection at a defined magnitude threshold, transforming the function from a graded response governor into a graded-then-binary safety gate without altering the upstream computation. The structural property that defines the scope is the closed-form, deterministic, bounded, experience-and-self-esteem-modulated mapping from per-domain residuals to a lineage-recorded deviation magnitude consumed by downstream response primitives.

Nick Clark Invented by Nick Clark Founding Investors:
Anonymous, Devin Wilkie
72 28 14 36 01