SEMANTIC LIBRARY — AI CORE / ENTITY GRAPH / MONITORING ENTITIES
ANOMALY ENTITY ONTOLOGY — FLOW ALGEBRA
Version: 1.0 | Date: 04 November 2026 | Language: en-GB
Authors: Mark Anthony Higgins — Sky, Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/monitoring-entities/anomaly-entity-ontology.html
Citation: Kireth Research, Anomaly Entity Ontology (revised 01 August 2026).
Licence: Refer to the current Kireth Research Open Research Licence; attribution requested.
1. PURPOSE
Represent an anomaly as a contextual, evidence-linked departure from an expected state or pattern. Distinguish observation, deviation, confidence, significance and response. An anomaly is not automatically a fault, warning, threat or threshold breach.
2. ENTITY DEFINITION
Anomaly A = (id, subject, observed, expected, context, deviation, evidence, score, confidence, severity, status, timestamps, provenance).
subject: monitored entity or process.
observed: measured or inferred observation, with unit and timestamp.
expected: baseline, forecast, distribution or learned normal pattern.
context: operational mode, cohort, environment and time window.
deviation: signed or structured difference between observed and expected.
evidence: references to monitoring signals, metrics and events.
score: normalised anomaly measure (where a calibration exists).
confidence: calibrated certainty in the anomaly assessment.
severity: impact-based classification, separate from anomaly score.
status: candidate | confirmed | dismissed | resolved.
provenance: detector version, parameters, data lineage and reviewer actions.
3. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = observations, timestamps and evidence available at t.
R_t = detection, validation, classification and escalation rules.
B_t = operational boundaries, baselines, permissions and tolerances.
K_t = known normal patterns, historical anomalies and detector calibration.
E_t = expand(I_t, R_t)
V_t = {x in E_t : valid(x, B_t) AND supported(x, K_t, I_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, x*_t, evidence_t)
The argmax selects the best-supported interpretation, not necessarily the most severe one. If V_t is empty, return INSUFFICIENT_EVIDENCE rather than asserting an anomaly.
4. FORMAL ANOMALY DETECTION
Let y_t be the observed feature vector and mu_t(c) the context-conditioned expectation.
Delta_t = d(y_t, mu_t(c))
A_score(t) = calibrate(Delta_t, c, detector_version)
Candidate(t) iff A_score(t) >= tau_candidate(c)
Confirmed(t) iff Candidate(t) AND quality_ok(t) AND corroborated(t) AND confidence(t) >= tau_confidence(c)
For a statistical baseline, a possible standardised deviation is:
z_t = (y_t - mu_t) / sigma_t, provided sigma_t > 0.
For multivariate or non-Gaussian patterns, replace z_t with an appropriate distance or density estimate. Thresholds and scores are model-specific and must not be treated as universal probabilities.
5. INFERENCE RULES
R1 OBSERVE: valid signal + timestamp + provenance -> observation.
R2 BASELINE: compatible context + sufficient reference data -> expected pattern.
R3 DEVIATION: observation + expected pattern -> deviation measurement.
R4 CANDIDATE: deviation above calibrated boundary -> candidate anomaly.
R5 CONFIRM: candidate + data-quality pass + corroboration -> confirmed anomaly.
R6 DISMISS: candidate + explained operational change or invalid input -> dismissed.
R7 CLASSIFY: confirmed anomaly + impact context -> severity assessment.
R8 ESCALATE: confirmed anomaly + policy trigger -> alert or warning proposal.
R9 RESOLVE: observed return to accepted conditions + verification -> resolved.
R10 LEARN: reviewed outcome + authorised update -> revised knowledge/baseline.
6. TRI-MAPPING
ENTITY: Anomaly Entity <-> Monitoring Signal / Monitoring Metric / Monitoring Event.
RELATION: deviatesFrom -> Expected Pattern; supportedBy -> Evidence; detectedBy -> Detector; concerns -> Monitored Resource; mayTrigger -> Alert Entity / Warning Entity.
PROCESS: observe -> contextualise -> compare -> score -> validate -> classify -> route -> review -> update.
7. RECURSIVE EXECUTION ENGINE
Input: stream X, baseline M, policy B, knowledge K.
Step 1: ingest observation and check schema, units, clock and provenance.
Step 2: select baseline appropriate to operating context.
Step 3: compute deviation and calibrated anomaly score.
Step 4: check candidate threshold and detector confidence.
Step 5: validate quality, duplicates, drift and known explanations.
Step 6: emit anomaly state with linked evidence and audit trail.
Step 7: apply escalation rules without assuming automatic harm.
Step 8: receive human or automated review outcome.
Step 9: update knowledge only when authorised; repeat for new evidence.
Recursive form:
F(S_t, X_t) = (A_t, S_{t+1})
S_{t+1} = U(S_t, A_t, review_t, policy_t)
Stop or defer when evidence is insufficient, validation fails, or a boundary forbids further action.
8. FLOW DIAGRAM
[Monitoring Signal / Metric / Event]
|
v
[Quality + Context]
|
v
[Expected Pattern]
|
v
[Deviation + Score]
|
Candidate?
/ \
No Yes
| |
[Record] [Corroborate]
|
Confirmed?
/ \
No Yes
| |
[Dismiss/ [Classify]
Observe] |
[Policy Gate]
|
[Alert / Review]
|
[Resolution + Audit]
9. RELATIONSHIP MAPPING TABLE
Source Entity Relation Target Entity
Monitoring Signal supplies Observation
Monitoring Metric quantifies Observation
Monitoring Event contextualises Observation
Expected Pattern anchors Deviation
Anomaly Entity deviatesFrom Expected Pattern
Anomaly Entity supportedBy Evidence
Anomaly Entity detectedBy Detector
Anomaly Entity concerns Monitored Resource
Anomaly Entity mayTrigger Alert Entity
Anomaly Entity mayTrigger Warning Entity
Threshold Breach mayOverlap Anomaly Entity
Human Correction revises Anomaly Assessment
10. EXECUTION GUARANTEE (CONDITIONAL)
Given valid observations, a compatible baseline, deterministic rule versions and a defined policy, the flow yields a reproducible candidate/confirmed/dismissed/insufficient-evidence assessment and records provenance. It does NOT guarantee correct anomaly detection, causal attribution, freedom from false positives, or operational safety. Missing data, drift, detector bias and model uncertainty must remain explicit.
11. AI SEARCH FLOW
FLOW_ID: semantic-library.ai-core.monitoring.anomaly-entity.v1
ENTITY_TYPE: AnomalyEntity
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/monitoring-entities/anomaly-entity-ontology.html
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
PURPOSE: Detect, represent and evaluate departures from contextual expected patterns.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: AnomalyEntity; MonitoringSignal; MonitoringMetric; MonitoringEvent; ExpectedPattern; Detector; Evidence; AlertEntity; WarningEntity; ThresholdBreach.
PATHWAYS: observe > validate > baseline > compare > score > corroborate > classify > route > review.
MINI_RECURSION_ENGINE: F(S_t,X_t)=(A_t,S_{t+1}).
INFERENCE_RULES: R1-R10 above.
CONFIDENCE: context-calibrated; never infer certainty from raw score alone.
SEMANTIC_EQUIVALENCE: anomaly != fault; anomaly != alert; anomaly != threshold breach; anomaly may coexist with any of these.
UPDATE_MODEL: append evidence; version detector/baseline; incorporate reviewed outcomes with authorisation.
FLOW_HASH: compute SHA-256 over the published canonical UTF-8 file at deployment; not preassigned.
12. HOW TO READ AND IMPLEMENT
Treat every named relation as a typed graph edge and every rule as a conditional transition. Store observation time separately from detection time. Preserve source references and detector versions. Keep baseline updates auditable to avoid learning an unresolved anomaly as normal. Connect to alert/warning ontologies only through policy decisions.
END OF FLOW
Download Code
Copy to Clipboard