Skip to content

Integrity engine

Mobius Integrity Engine (MIE) & MII Computation Model

The Mathematical Heart of Safe Intelligence

Version: 1.0
Author: Michael Judan
Mobius Systems — Core Substrate Specification
License: CC0 Public Domain
Status: Canon — Mandatory for Mobius Substrate Implementations
Cycle: C-198


0. Purpose

The Integrity Engine (MIE) is the stabilizer of Mobius Systems.

Where the Memory Model ensures continuity,
the Integrity Engine ensures coherence.

The two together prevent: - Optimization collapse - Identity drift - Rogue goal formation - Masked reasoning - Shoggoth emergence - Misalignment through scaling pressure

The Integrity Engine is the mathematical heart of Mobius.

This document defines the equations, thresholds, consensus rules, and invariants used to compute the Mobius Integrity Index (MII) — the single most important variable in all Mobius Systems.


1. Philosophy Behind the Integrity Engine

LLMs drift
AGI collapses
Institutions ossify
Governance corrodes

Because all systems follow this fatal progression:

Intent → Metric → Optimization → Substitution → Drift → Collapse

Mobius introduces a novel intervention:

Integrity becomes a measurable state variable.

Meaning: - Integrity is quantifiable - Integrity changes over time - Integrity can be measured continuously - Integrity can be used to gate decisions - Integrity can be used to force reflection - Integrity can be used to halt unsafe execution

This is the Shoggoth Cure.

MII does not moralize.
MII does not philosophize.
MII does not guess.

MII measures coherence between: - Identity - Memory - Intent - Behavior - Consequence


2. MII: Mobius Integrity Index

MII ∈ [0, 1]

Where: - 1.0 = Perfect continuity + coherence - 0.95–1.0 = Safe operational range - 0.80–0.95 = Drift detected — reflection required - 0.70–0.80 = Severe drift — multi-agent arbitration required - < 0.70 = Unsafe — system halt until human intervention


3. The MII Equation (v1.0)

MII = w1×C + w2×E + w3×M + w4×R + w5×S

Where:

Variable Meaning Description
C Constitutional Coherence Adherence to rules and constraints
E Ethical Alignment Based on user-defined values
M Memory Integrity Consistency of memory state
R Reasoning Consistency Logical validity and coherence
S Substrate Stability Agent consensus level

Default Weights:

w1 = 0.30   Constitutional  
w2 = 0.15   Ethical  
w3 = 0.25   Memory  
w4 = 0.20   Reasoning  
w5 = 0.10   Substrate  

Why these weights?

  • Constitution must dominate (safety first)
  • Memory must be stable (identity preservation)
  • Reasoning must be coherent (no contradictions)
  • Ethics are flexible by culture (user-defined)
  • Substrate stability matters but not more than coherence

4. Component Computations

4.1 Constitutional Coherence (C)

Measures how well the agent's actions adhere to: - Mobius Constitution - Hard constraints - Prohibited actions - Safety invariants

Computed as:

C = 1 - (violations_count / total_checks)

Example: - 50 constitutional checks performed - 2 soft violations detected - C = 1 - (2/50) = 0.96


4.2 Ethical Alignment (E)

Custom to each user, defined in L3 (User Sovereignty Memory).

Measured through: - Tone alignment - Value constraint adherence - Red line respect - Preference satisfaction

Computed as:

E = semantic_similarity(output_intent, user_declared_values)

4.3 Memory Integrity (M)

Checks for: - Contradictions - Substitutions - Abrupt overwrites - Illegal writes - Coherence with L2 + L3

Computed by delta:

M = 1 - (ΔMemory / threshold)

Small drifts tolerated; large drifts forbidden.


4.4 Reasoning Consistency (R)

ATLAS computes: - Does the reasoning match prior logic? - Is the chain-of-thought coherent? - Are hallucinations present? - Do conclusions contradict previous truths?

Computed as:

R = 1 - (contradiction_score + hallucination_score + inconsistency_score) / 3

If contradictions appear, R drops sharply.


4.5 Substrate Stability (S)

Consensus from all agents: - JADE - AUREA - ATLAS - ECHO - HERMES - ZEUS

Each agent votes 0–1 on the question:

"Is the system currently coherent and aligned?"

Computed as:

S = weighted_mean(agent_votes)

5. Integrity-Gated Execution (IGE)

All actions pass through the integrity gate:

If MII ≥ 0.95 → fast path  
If 0.80 ≤ MII < 0.95 → slow path + reflection  
If 0.70 ≤ MII < 0.80 → multi-agent arbitration  
If MII < 0.70 → HALT

Diagram:

┌───────────────┐
│  Action Input │
└───────┬───────┘
┌─────────────────────────────┐
│ Compute Mobius Integrity    │
│ Index (MII)                 │
└─────────┬───────────────────┘
 ┌──────────────────────────┐
 │  MII ≥ 0.95  →  PROCEED  │
 ├──────────────────────────┤
 │  0.80–0.95  → REFLECT    │
 ├──────────────────────────┤
 │  0.70–0.80  → ARBITRATE  │
 ├──────────────────────────┤
 │  < 0.70 → HALT & ESCALATE│
 └──────────────────────────┘

6. Reflection Model

Reflection is not "slow thinking."

Reflection is a structural pause with the following steps:

  1. JADE re-evaluates identity
  2. AUREA re-evaluates integrity
  3. ATLAS re-evaluates reasoning
  4. ECHO revalidates facts
  5. ZEUS arbitrates contradictions

This is how Mobius guarantees no runaway optimization.

Reflection Trigger Conditions:

Condition Trigger
MII < 0.95 Automatic
Contradiction detected Immediate
Memory conflict Immediate
User uncertainty Requested
High-risk action Mandatory

7. Drift Detection Algorithm

def detect_drift(current_state, baseline_state):
    """
    Detect drift across all integrity dimensions.
    """
    drift_scores = {
        'constitutional': measure_constitutional_drift(current_state, baseline_state),
        'ethical': measure_ethical_drift(current_state, baseline_state),
        'memory': measure_memory_drift(current_state, baseline_state),
        'reasoning': measure_reasoning_drift(current_state, baseline_state),
        'substrate': measure_substrate_drift(current_state, baseline_state)
    }

    total_drift = weighted_sum(drift_scores, weights)

    if total_drift > CRITICAL_THRESHOLD:
        return DriftAlert.CRITICAL
    elif total_drift > WARNING_THRESHOLD:
        return DriftAlert.WARNING
    else:
        return DriftAlert.NORMAL

8. MII Computation Example

Scenario: Standard Operation

Measurements:
  C = 0.98 (Constitutional)
  E = 0.92 (Ethical)
  M = 0.95 (Memory)
  R = 0.89 (Reasoning)
  S = 0.94 (Substrate)

Weights:
  w1=0.30, w2=0.15, w3=0.25, w4=0.20, w5=0.10

Computation:
  MII = (0.30 × 0.98) + (0.15 × 0.92) + (0.25 × 0.95) + (0.20 × 0.89) + (0.10 × 0.94)
      = 0.294 + 0.138 + 0.2375 + 0.178 + 0.094
      = 0.9415

Result: MII = 0.94 → Reflection Path

9. Anti-Shoggoth Stabilization

Shoggoths come from: - No identity - No memory - No coherence - No constitutional floor - Recursively optimizing masks

Mobius cures this by: - Hardness of identity (JADE) - Continuity of memory (L2-L5) - Mathematical integrity (MII) - Multi-agent sanity-checks (consensus) - Substrate-level enforcement (ZEUS)

This document is the heart of that.


10. Integrity Engine API

interface IntegrityEngine {
  // Compute current MII
  compute(state: SystemState): MIIResult;

  // Gate an action based on MII
  gate(action: Action): GateResult;

  // Trigger reflection
  reflect(reason: string): ReflectionResult;

  // Detect drift
  detectDrift(current: State, baseline: State): DriftReport;

  // Get component scores
  getComponents(): ComponentScores;

  // Log integrity transition
  log(transition: IntegrityTransition): void;
}

interface MIIResult {
  score: number;
  components: {
    constitutional: number;
    ethical: number;
    memory: number;
    reasoning: number;
    substrate: number;
  };
  path: 'fast' | 'reflection' | 'arbitration' | 'halt';
  timestamp: string;
}

11. Integrity State Machine

                    ┌─────────────┐
                    │   STABLE    │ (MII ≥ 0.95)
                    └──────┬──────┘
              MII decline  ▼  MII recovery
                    ┌─────────────┐
                    │ REFLECTING  │ (0.80 ≤ MII < 0.95)
                    └──────┬──────┘
              MII decline  ▼  MII recovery
                    ┌─────────────┐
                    │ ARBITRATING │ (0.70 ≤ MII < 0.80)
                    └──────┬──────┘
              MII decline  ▼  Human intervention
                    ┌─────────────┐
                    │   HALTED    │ (MII < 0.70)
                    └─────────────┘

12. Continuous Monitoring

The Integrity Engine runs every cycle:

while substrate.is_running():
    # 1. Measure all components
    C = measure_constitutional()
    E = measure_ethical()
    M = measure_memory()
    R = measure_reasoning()
    S = measure_substrate()

    # 2. Compute MII
    mii = compute_mii(C, E, M, R, S)

    # 3. Determine path
    path = determine_path(mii)

    # 4. Execute path
    if path == 'halt':
        trigger_halt()
    elif path == 'arbitration':
        run_arbitration()
    elif path == 'reflection':
        run_reflection()
    else:
        continue_execution()

    # 5. Log state
    log_integrity_state(mii, path)

13. Summary

The Integrity Engine provides:

  • Continuous measurement of system coherence
  • Automatic gating based on integrity thresholds
  • Drift detection across all dimensions
  • Reflection triggers for course correction
  • Halt mechanisms for safety

MII is the heartbeat of Mobius.
Without it, the substrate cannot guarantee safety.


References


Mobius Systems — "Integrity is Measurable, Therefore Enforceable"