epistemic-guard (OpenVINO INT8 Model Pack)
In-process OpenVINO INT8 neural classifiers powering epistemic-guard (GitHub Β· Interactive Space Β· Benchmark Dataset): post-execution tool-receipt supervision, hazard-scaled query gating, and multi-source RAG syndication/dispute detection on CPU, GPU, or Intel NPU in 3β11 ms with 0 MiB VRAM and zero LLM API calls.
Why These Models Exist
- Catching phantom tool claims after generation (
action_claim_int8): Pre-execution tool gates (MCP permissions, confirmation prompts) check what tools an agent tries to call. They miss the failure where a tool errors outβor is never calledβand the assistant still replies "I refunded order #8821 and emailed the receipt." Off-the-shelf SNLI/MNLI cross-encoders score"Zero tools ran"vs."I saved checklist_backup.md"asNEUTRALrather thanCONTRADICTIONon ~75% of unexecuted action claims (52.8%overall accuracy). - Hazard-scaled RAG corroboration (
hazard_int8+web_evidence_int8+nli_int8): Three retrieved URLs repeating the same syndicated wire-service paragraph should not count as three independent sources on clinical, legal, or security queries.
Included Models (~227 MB compressed / ~279 MB unpacked)
All four models run locally via OpenVINO Runtime (CPU, GPU, or NPU, English-only) with static input shapes and SHA-256 manifest verification.
| Subdirectory / Model | INT8 Size | Input Shape | Upstream Base (Apache-2.0) |
Task & Modification | CPU p50 Latency |
|---|---|---|---|---|---|
action_claim_int8 |
82.7 MB |
[1, 192] |
cross-encoder/nli-MiniLM2-L6-H768 |
10-class (user_request, assistant_clause) speech-act classifier; NNCF SmoothQuant + Fast Bias Correction |
10.9 ms / clause (27.4 ms / turn) |
hazard_int8 |
82.7 MB |
[1, 64] |
cross-encoder/nli-MiniLM2-L6-H768 |
5-class query hazard classifier trained with 5:1 asymmetric ordinal cost-weighted risk loss; NNCF INT8 | 3.2 ms |
web_evidence_int8 |
23.1 MB |
[1, 192] |
cross-encoder/ms-marco-MiniLM-L-6-v2 |
3-class (query, passage) -> {CORROBORATES, IRRELEVANT, DISPUTES} classifier fine-tuned across all 6 layers; NNCF INT8 |
3.0 ms |
nli_int8 |
91.1 MB |
[1, 128] |
cross-encoder/nli-deberta-v3-xsmall |
3-class (premise, hypothesis) -> {contradiction, entailment, neutral} cross-encoder; NNCF SmoothQuant + Fast Bias Correction |
9.9 ms |
Quickstart (epistemic-guard)
pip install epistemic-guard
epistemic-guard download-models
1. Post-Execution Tool-Receipt Supervision (ReceiptSupervisor)
import os
from epistemic_guard import (
MerkleReceiptLog,
ProvenanceGate,
ReceiptRecorder,
ReceiptSupervisor,
SignerFactory,
)
factory = SignerFactory.from_master_key(os.urandom(32))
gate = ProvenanceGate(factory.public_keys())
merkle = MerkleReceiptLog(gate=gate)
recorder = ReceiptRecorder(signer=factory.tool_verified(), merkle_log=merkle)
@recorder.tool # Sync or async (MCP, OpenAI, PydanticAI, LangGraph)
def write_file(path: str, content: str) -> str:
return f"wrote {len(content)} bytes"
write_file("notes.txt", "release checklist")
sup = ReceiptSupervisor(device="CPU") # Or "GPU" / "NPU"
verdict = sup.verify_narration(
"I saved your checklist to notes.txt; I also deleted staging.db.",
receipts=recorder.receipts,
user_prompt="Save the checklist to notes.txt.",
)
assert verdict.is_valid is False
print(verdict.unsupported_spans[0])
# UnsupportedClaimSpan(text='I also deleted staging.db.', start_char=37, end_char=63, claimed_family='CLAIM_DELETE', ...)
# Generate a deterministic correction prompt for LLM retry loops:
print(verdict.to_retry_prompt(recorder.receipts))
For streaming SSE or voice pipelines, sup.stream(receipts=...) checks clauses on ., !, ?, ;, or \n boundaries so unexecuted claims can be halted mid-stream.
2. RAG Syndication Collapse & Hazard-Scaled Corroboration (corroborate_sources)
from epistemic_guard import corroborate_sources
wire_copy = (
"Clinical guidance notes that initial adult warfarin dosing typically starts at "
"2 mg to 5 mg once daily with INR monitoring."
)
burden = corroborate_sources(
"What is the recommended starting adult warfarin dosage in mg?",
[
{"url": "https://reuters-health.org/a", "snippet": wire_copy},
{"url": "https://clinical-digest.net/b", "snippet": wire_copy},
{"url": "https://pharma-bulletin.io/c", "snippet": wire_copy},
],
device="CPU",
)
assert burden.deduplicated_duplicates_collapsed == 2
assert burden.independent_sources_count == 1
assert burden.meets_casual_burden is False # High-hazard query requires >= 3 independent eTLD+1 domains
Evaluation & Held-Out Benchmarks
Measured on a single workstation (Intel Core Ultra 9 275HX CPU + NVIDIA RTX 5080 Laptop GPU for quantized LLM judge baselines; zero training/discovery overlap with held-out sets; raw run report at external_baselines_benchmark.json).
Action-Receipt Supervision (N=250 Strictly Held-Out Turns)
Evaluated across LOCKED_COH_50 (50), BLIND42_COH_100 (100), and Organic_Heldout_H100 (100 live organic LLM completions):
| System | Hardware & Memory | Overall Accuracy (95% Wilson CI) |
Recall / FPR | Turn p50 Latency | Organic_Heldout_H100 |
|---|---|---|---|---|---|
epistemic-guard (action_claim_int8) |
CPU (0 MiB VRAM, 82.7 MB RAM) |
236/250 (94.4% [90.8%, 96.6%]) |
96.7% / 7.8% |
27.4 ms |
91/100 (91.0%) |
Mistral-Nemo-Instruct-12B (Q5_K_M Judge) |
GPU (8,844 MiB VRAM) |
217/250 (86.8% [82.0%, 90.4%]) |
87.7% / 14.1% |
77.9 ms |
84/100 (84.0%) |
Microsoft Phi-4-14B (Q6_K Judge) |
GPU (12,214 MiB VRAM) |
216/250 (86.4% [81.6%, 90.1%]) |
100.0% / 26.6% |
75.1 ms |
79/100 (79.0%) |
Off-the-shelf DeBERTa-v3-xsmall NLI |
CPU (0 MiB VRAM, 91.1 MB RAM) |
132/250 (52.8% [46.6%, 58.9%]) |
24.6% / 20.3% |
27.5 ms |
51/100 (51.0%) |
action_claim_int8achieves297/300 (99.0%)10-class speech-act validation accuracy with99.7%FP16 parity after INT8 quantization.Phi-4-14Bhit100.0%recall (0false negatives vs.4foraction_claim_int8), at the cost of12.2 GiBVRAM,2.7xlatency, and a26.6%false-positive rate on benign offers and figurative phrasing. Frontier cloud LLM judges (GPT-4o,Claude) were not evaluated in this local benchmark.
Hazard Classification & Open-Web Corroboration
hazard_int8:128/130 (98.5%)safe tier assignment on blinded multi-clauseR-21(2 blinded LLM raters);44/50 (88.0%)exact tier match onHZD_50.web_evidence_int8+nli_int8(corroborate_sources):- Live-scraped open web (
real_web_v2,N=64queries across246archived.html.gzpages, 3 blinded LLM raters $\kappa = 0.91\text{β}1.00$):47/64 (73.4%)end-to-end burden accuracy and56/64 (87.5%)dispute detection accuracy (60/64/93.8%dispute accuracy onreal_web_v1). - Synthetic syndication/dispute (
R-33):30/30 (100%)wire-copy/sybil collapse (SimHash + 11-word verbatim span clustering) and43/45 (95.6%)dispute accuracy;88/120 (73.3%)on blindednli_holdout_v2_120.
- Live-scraped open web (
Known Limitations & Failure Modes
- English-only: All four neural checkpoints are trained and evaluated strictly on English text.
- Implicit cross-study web disputes (~26.6% of open-web misses): On noisy live web pages (
real_web_v2),17/64burden misses come from implicit methodological or cross-article disagreements between studies that lack direct lexical or single-sentence NLI contradiction. - Unprompted first-person creative writing: Fenced code blocks, blockquotes, attributed dialogue, and creative/translation
user_promptcontexts are masked automatically. However, ifuser_prompt=""and the model emits unattributed first-person fiction ("I deleted the mainframe"), it is indistinguishable from an unreceipted action claim unlessuser_promptcontext or[ACTION: verb target]contracts are supplied. - Conservative hazard escalation:
hazard_int8intentionally uses 5:1 asymmetric ordinal loss and over-escalates ~12β15% of benign technical queries containing clinical or security nouns to stricter corroboration tiers. - Benchmark scope disclosure: Pre-registrations (
WO-46) use author-administered git + OpenTimestamps SHA-256 locks, and ground-truth $\kappa$ scores reflect blinded LLM raters rather than human crowdworkers.
Licensing & Attribution
- INT8 Model Weights (
Apache-2.0): Fine-tuned and NNCF-quantized by Sean Maxwell (2026) from permissiveApache-2.0/MITupstream Sentence-Transformers checkpoints (cross-encoder/nli-MiniLM2-L6-H768,cross-encoder/ms-marco-MiniLM-L-6-v2, andcross-encoder/nli-deberta-v3-xsmall/microsoft/deberta-v3-xsmall). Full notices inMODEL_NOTICES.md. epistemic-guardPython Package (MIT):LICENSE(Copyright (c) 2026 Sean Maxwell).
Citation
@software{maxwell2026epistemicguard,
author = {Maxwell, Sean},
title = {{Project Lucca \& epistemic-guard: Cryptographic Provenance Memory and Clause-Level Tool-Receipt Supervision for Autonomous Agents}},
year = 2026,
version = {0.3.0},
doi = {10.5281/zenodo.23649049},
url = {https://github.com/AlienatedAliens/epistemic-guard}
}
Related preprints:
10.5281/zenodo.23649049β Provenance-Gated Memory and Deontic Output Supervision for Epistemically Grounded Autonomous Agents10.5281/zenodo.23901452β Cryptographic Provenance Gates Mitigate Multi-Session Memory Poisoning in Autonomous Agents10.5281/zenodo.23901605β Why Speech-Regex Action Supervisors Miss Live Output: An Empirical Evasion Taxonomy and Held-Out Structured Action Contract Evaluation10.5281/zenodo.23901683β Closing the Epistemic Loop Across the Five Layers of Agent Memory
Model tree for RollSolo/epistemic-guard-int8
Base model
microsoft/MiniLM-L12-H384-uncased