Documentation
← Back to Home

OpLogica Framework Documentation

Complete technical reference for the triadic verification framework for accountable AI decision systems.

OpLogica is a triadic verification framework that unifies three dimensions of AI accountability:

Unlike post-hoc explanation methods (LIME, SHAP), OpLogica provides formal justifications: verifiable demonstrations that specific decisions followed necessarily from declared constraints and observed data.

📄 Paper: "OpLogica: A Triadic Verification Framework for Accountable AI Decision Systems — Design, Implementation, and Empirical Validation"
Currently under peer review at AI and Ethics (Springer Nature).

📜 License: Apache 2.0

2. The Triadic Framework

OpLogica's core innovation is unifying three proof types into a single, cryptographically bound verification bundle. No other framework integrates all three.

2.1 Proof of Operation (PoO)

Cryptographic verification that computational processes executed as specified — without tampering or corruption.

Purpose: Ensure no unauthorized modification occurred during decision computation.

Mechanism:

What it proves: The decision record is intact and was produced by the authorized system at the claimed time.

Paper reference: Definition 3.1, Layer L0–L1

2.2 Proof of Reason (PoR)

Formal demonstration that decisions follow necessarily from premises and rules. Not just "what features mattered," but why the output was the right one given declared policies and observed data.

Mechanism:

What it proves: The decision is the unique logical consequence of the given data and the declared policy.

Paper reference: Definition 3.3–3.4, Layer L3

2.3 Proof of Intent (PoI)

A priori declaration of ethical constraints, cryptographically signed before any decision is made.

Purpose: Prevents post-hoc rationalization. The system proves that constraints existed before operations and that decisions satisfied them.

Mechanism:

What it proves: The ethical rules were not invented after the fact. They were committed to in advance.

Paper reference: Definition 3.5–3.6, Layer L3

3. Formal Definitions

Definition 3.1 — Proof of Operation (PoO)

A Proof of Operation is a tuple PoO = (H, T, Σ) where:

H = SHA3-256(serialize(D, P, T)) — cryptographic hash of the decision state

T ∈ ISO-8601 — UTC timestamp

Σ = Sign(sk, H ∥ T) — digital signature

Definition 3.2 — Verification Predicate

V(PoO) = 1 iff Verify(pk, Σ, H ∥ T) = 1 ∧ T ≤ T_now

Definition 3.3 — Reason Graph

A Reason Graph is a directed acyclic graph G = (V, E) where:

V = V_premise ∪ V_rule ∪ V_conclusion (disjoint partition)

E ⊆ V × V with labels ∈ {input, entails, determines}

• For every v ∈ V_conclusion, ∃ path from v' ∈ V_premise through v'' ∈ V_rule

Definition 3.4 — Proof of Reason (PoR)

PoR = (G, Δ, H_G) where:

G — valid Reason Graph

Δ — delta-logic evaluation trace

H_G = SHA3-256(serialize(G))

Definition 3.5 — Constraint Specification

A constraint C = (id, rule, severity) where:

rule — predicate over decision variables

severity ∈ {mandatory, warning}

Definition 3.6 — Proof of Intent (PoI)

PoI = (P, C_set, T_decl, Σ_decl) where:

P — policy name

C_set = {C₁, ..., Cₙ} — constraint set

T_decl < T_decision (Temporal Precedence)

Σ_decl = Sign(sk, serialize(P, C_set, T_decl))

Definition 3.7 — Verification Bundle

VB = (PoO, PoR, PoI, M_root) where:

M_root = MerkleRoot(H_PoO, H_PoR, H_PoI)

V(VB) = 1 iff V(PoO) ∧ V(PoR) ∧ V(PoI) ∧ VerifyMerkle(M_root)

Axiom 3.1 — Temporal Precedence

For any valid verification bundle VB:

T_PoI < T_PoO — Intent must precede Operation

4. Architectural Layers

OpLogica implements five architectural layers, from foundational event recording to external verification interfaces:

L4
Verification Interface — REST/JSON APIs and offline validation
L3
Logic Kernel of Trust — Reason Graphs and Δ-Logic Engine
L2
Witness Consensus — Distributed timestamp federation
L1
Post-Quantum Authenticity — Dilithium-III signatures (NIST PQC)
L0
Canonical Event Lineage — Deterministic serialization, SHA3-256

5. Constraint DSL

OpLogica uses a domain-specific language for declaring constraints in the Proof of Intent:

// Medical Triage — Emergency Triage Protocol v2.1 C1 (vital_priority, mandatory): WHEN patient.vital_score < 0.5 THEN decision.priority = HIGH C2 (fairness_bound, mandatory): FOR_ALL group IN demographics: |mean_wait(group) - mean_wait(all)| <= 0.04 C3 (max_wait, warning): WHEN patient.wait_time > 60 THEN decision.reassessment = TRUE C4 (justification_required, mandatory): WHEN decision.priority_changed = TRUE THEN reason_graph.depth >= 2

6. Interactive Demos

Try the OpLogica framework with live, interactive demonstrations:

🔬 Medical Triage Demo
Deterministic patient triage with full triadic verification. Five patient parameters produce a priority decision with PoO, PoR, PoI, and Merkle root.

Try Medical Triage Demo →
🏦 Financial Credit Assessment Demo
Deterministic loan evaluation with full triadic verification. 5 financial parameters → Approval decision with PoO, PoR, PoI, and Merkle root.

Try Credit Assessment Demo →
💼 Employment Screening Demo
Deterministic candidate evaluation with full triadic verification. 5 applicant parameters → Hiring recommendation with PoO, PoR, PoI, and Merkle root.

Try Employment Screening Demo →
🏛️ Government Building Permit Demo
Deterministic permit evaluation with full triadic verification. 5 project parameters → Permit decision with PoO, PoR, PoI, and Merkle root.

Try Building Permit Demo →
💬 Chat Integration
Ask the OpLogica chat for a triage assessment with patient parameters. The system intercepts the request and runs the deterministic engine automatically.

Open Chat →

Coming Soon:

7. Empirical Results

Validated in a medical triage simulation with 1,000 synthetic patient cases. Comparative evaluation against LIME and unverified baseline:

MetricOpLogicaLIMEUnverified
Verification Coverage100%87%0%
External Auditability98%71%12%
Policy Compliance99.2%94%89%
Mean Latency47 ms134 ms23 ms
Constraint Satisfaction99.8%N/AN/A

Ablation Study: Each proof type contributes non-redundantly:

All differences statistically significant at p < 0.001

8. Regulatory Alignment

EU AI Act (2024)

GDPR Article 22

"Meaningful information about the logic involved" — OpLogica provides exactly this: not just feature importance, but formal proof that the decision followed from declared rules.

NIST AI Risk Management Framework

Aligned with EU AI Act and GDPR Article 22: OpLogica provides the "meaningful information about the logic involved" and verifiable record-keeping that regulators require for high-stakes and high-risk AI systems.

9. API Reference

POST /api/triage-demo

Run a medical triage assessment with full triadic verification.

Request:

{ "vital_score": 0.32, // float 0–1 "age": 68, // integer "comorbidity_index": 0.7, // float 0–1 "wait_time": 50, // integer (minutes) "resource_score": 0.6 // float 0–1 }

Response:

{ "decision": { "priority": "HIGH", "critical": true, "urgency": "IMMEDIATE", "reassessment": false, "reasons": [...], "allRules": [...] }, "verification_bundle": { "bundle_id": "VB-...", "poo": { "hash": "...", "timestamp": "...", "signature": "..." }, "por": { "graph": {...}, "hash": "..." }, "poi": { "policy": "...", "results": [...] }, "merkle_root": "...", "overall_result": "VERIFIED" } }

10. Source Code & Reproducibility

The implementation is open-source under the Apache 2.0 license.

Key Files:

Reproducibility: All results in the paper can be reproduced using the provided code. The triage engine is fully deterministic: same inputs always produce the same decision and cryptographic proofs.

🔬 Code Ocean: Research capsules for reproducible execution available on the platform. 18 published capsules, 11 featured on the main page — placing the author in the top 0.1% of researchers globally on the platform.