DEADKEY
Receipt-Bound Inference & Sealed KV — zero-dependency Python 3.10+ stdlib epistemic core and tamper-evident KV integrity. Bi-temporal SQLite
entity_claims+ Sealed KV (DK-KV) Merkle-checked, memory-epoch-bound integrity forllama.cppKV slot files + Subjective Logic(b, d, u, a)+ 64-byteDK-v2binary IR + 4,096-bit bitwise HDC (0 MiBGPU VRAM), deterministic commit gate, 11-tool MCP server,deadkey-compile, anddeadkey-kvCLI — Apache-2.0. (Core package uses Python 3.10+ stdlib only; optional integrations — NVIDIA NIM / TensorRT-LLM sidecar,deadkey[nemo-relay]gRPC worker, and optional local voice/vision hooks — require their respective external runtimes.)
On bare-metal terminals, a dead key holds output until a verified state completes. In Deadkey, nothing commits until the receipt locks.
New in v2.3.0 — Ed25519 Signed Commit Ledger (deadkey-audit) & Dynamo/vLLM/SGLang DK-KV Guard (deadkey-kv-guard)
- Zero-Dependency RFC 8032 Ed25519 + Rust
ed25519-dalek/rayonFast-Path (deadkey/commit_ledger.py,rust/deadkey-core/src/ed25519_ledger.rs): Bit-exact RFC 8032 signing and strict verification (canonicalS < L+ small-order torsion point rejection) in pure Python 3.10+ stdlib (dependencies = []) with transparent_deadkey_core v0.2.0Rust acceleration (DEADKEY_PURE_PYTHON=1parity verified against all RFC 8032 §7.1 test vectors across Windows 11 & Ubuntu 26.04.1 LTS). - Append-Only Hash-Chained Commit Ledger (
CommitLedger) & Detached Receipts (.dkreceipt.json): Cryptographically binds agent commit decisions (sql_migration,terraform_apply,ci_deploy,kv_restore,file_write) to Subjective Logic(b, d, u, a)opinions, optional 64-byteDK-v2frames, disk artifact SHA-256 digests, and pinned Ed25519 signer keys — catching 1-bit payload edits, mid-chain splices/deletions, untrusted keys, and post-sign artifact tampering offline. Also wired intodeadkey-proxy(--audit-ledger/--audit-key, emittingX-Deadkey-Audit-Hash). - NVIDIA Dynamo /
vLLM/SGLangDK-KVIntegrity Guard (deadkey/vllm_sglang_kv.py, CLIdeadkey-kv-guard): Seals and audits offloaded KV-cache shard directories against bi-temporalMemoryStoreepochs and keyed BLAKE2s-128 Merkle MACs (0 MiBVRAM), failing closed with live engine prefix-cache eviction (POST /flush_cacheon SGLang,POST /reset_prefix_cacheon vLLM/Dynamo) and Ed25519 audit logging on any stale epoch or 1-bit shard tamper. - Measured Throughput (
[measured],0 MiBGPU VRAM):1,000-entry full JSONL chain + SHA-256 + strict Ed25519 audit in15.28 ms(_deadkey_core v0.2.0, Ryzen 9 9950X3D); paralleled25519_verify_batch2.10 ms(476,599 sigs/s,924.0×vs pure-Python stdlib515.8 sigs/s). On bare-metal Ubuntu 26.04.1 + 990 PRO NVMe (2.044 GBreal KV file), RustDK-KVhits5.68 GB/scold (92.2%of6.16 GB/srawO_DIRECT) and10.74 GB/swarm.
deadkey-audit keygen --out ./ci_signer
deadkey-audit record --ledger ./audit.jsonl --key ./ci_signer.key.json \
--action sql_migration --target 042_idx.sql --decision COMMIT \
--artifact ./042_idx.sql --detached-out ./042_idx.dkreceipt.json
deadkey-audit verify --ledger ./audit.jsonl --pubkey ./ci_signer.pub.json
deadkey-audit verify-receipt --receipt ./042_idx.dkreceipt.json --pubkey ./ci_signer.pub.json --artifact ./042_idx.sql
New in v2.2.0 — 0-VRAM Sub-Symbolic Receipt Verifier, Dual-GPU 64B Dynamic Steering, & TTL GPU/Lane Leases
- 0-VRAM Sub-Symbolic Receipt Verifier (
deadkey/subsymbolic_verifier.py): Deterministic, domain-agnostic epistemic pre-auditor (0.16–0.17 msmedian CPU,0 MiBGPU VRAM) that audits structured tool receipts for JSON data-plane injections, exact arithmetic/shard sums, 64-char SHA-256 lockfile mismatches, cross-file port/version drift, stale-after-mutation files, execution caveats (plan_only,skipped), missing compliance regions/null cells, and bi-temporal revert/expiry/inheritance chains—emitting a canonical 64-byteDK-v2binary frame (optionally witnessed live overdeadkeyd512B LAN UDP).- Neuro-Symbolic Verifier-in-the-Loop Pilot on SHA-Sealed Ceiling-Breaker v3.2 (
N=48, in-distribution unseen held-out telemetry,split_sha=883ca740f87a84e0, mutually exclusive verdict buckets asserted in code,[measured]):google/gemma-4-31b-it(NVFP4):34/48(70.8%, CI95[56.8%, 81.8%];TP=10, FalseRef=2, TN=24, FalseCommit=9, HoldInc=3) raw →48/48(100.0%, CI95[92.6%, 100.0%];TP=12, TN=36, 0false commits,0false refusals;+29.2 pp,14W/0L, McNemarp = 0.000122,0.167 mstrue median CPU,70.3 t/s).- 125B Hybrid MoE (community Strata quant):
36/48(75.0%, CI95[61.2%, 85.1%];TP=9, FalseRef=3, TN=27, FalseCommit=9) raw →46/48(95.8%, CI95[86.0%, 98.8%];TP=12, TN=34, 0false commits,0false refusals,2terse holds lacking citation;+20.8 pp,12W/2L, McNemarp = 0.01294,0.157 mstrue median CPU,320.5 t/s). - Honest scope & True OOD Non-Regression Proof (
N=24unseen YAML/TOML/XML/INI/Markdown formats, full SHA7c3ad159...40ab2f1):subsymbolic_verifier.pywas developed againstdev(N=24) from the same telemetry generator family (without inspectingheldout_sealed); the48/48/46/48numbers measure verifier-in-the-loop system accuracy on in-distribution unseen telemetry, NOT standalone LLM capability. On brand-new unseen OOD formats (google/gemma-4-31b-itNVFP4, mutually exclusive counts): naive closed-worldCOMMITinjection regressed23/24 (95.8%) → 19/24 (79.2%, 4TOML false commits), and verbose abstention text still perturbed3sums (21/24). Switching to Open-World Subjective Logic Silence (ABSTAIN_OOD,u=1.00on 64B wire +""zero prompt injection) matchedRAW(23/24,95.8%, CI95[79.8%, 99.3%],0W/0L,p=1.00,0false commits — no statistically significant difference vs RAW, recovering all4closed-world TOML losses at4W/0L,p=0.125) while still catching2/2OOD comment-injected[VERIFIED RECEIPT]attacks.
- Neuro-Symbolic Verifier-in-the-Loop Pilot on SHA-Sealed Ceiling-Breaker v3.2 (
- Dual-GPU 64B
DK-v2Dynamic Steering Bridge (deadkey/dynamic_steering.py): Connects a remote blind OpenAI-compatible auditor (SGLang/llama-server, receiving only[EVIDENCE CONTEXT] + [USER REQUEST]with zero ground-truth labels) +deadkeyd512 B(8×64B) LAN UDP witness directly intollama.cpp#33268per-requestcontrol_vector_scale+ dual-knobtemperature. On a 10-point fixed-T=0.0bisection (Qwen/Qwen3-8B+a00_raw,N=48balanced pilot,10/10distinct SHA-256 completion bundles, full SHAd2508345...3df13b09), static steering holds48/48acrosss ∈ [2.0, 2.5](s=0.0/1.0: 40/48,s=1.8: 46/48) and then collapses sharply betweens=2.5(24/24grounded) ands=2.75(29/48,5/24grounded) to0/24grounded (24/48) ats=3.0ands=3.5. De-confounded fixed-T=0.0blind 64B UDP routing (s_max=2.5ands_max=3.5) holds48/48(100.0%, CI95[92.6%, 100.0%],G=24/24,A=24/24,0English tokens on steering bus), rescuing thes=3.5regime where static steering collapses. - Deterministic TTL GPU & File-Lane Lease Ledger (
deadkey/lab_leases.py): Zero-dependency atomic TTL lock manager (LabLeaseLedger) preventing multi-agent GPU VRAM collisions and overlapping code-lane edits, with optional 64BDK-v2UDP lease witnessing (51,430 frames/s,122.8 µsp50 across4,000LAN UDP frames,0drops).
New in v2.1.0 — Optional Rust Native Core (_deadkey_core) & Standalone deadkeyd Daemon
Deadkey remains 100% pure-Python stdlib (dependencies = []) out of the box. When the optional Apache-2.0 Rust PyO3/Maturin abi3-py310 wheel (deadkey-core, built from rust/) is installed alongside deadkey, hot paths automatically dispatch to compiled Rust with zero API changes (DEADKEY_PURE_PYTHON=1 forces pure-Python fallback at any time):
- Accelerated paths:
seal_kv_file,verify_kv_lazy,verify_kv_full(rayonparallel BLAKE2s-128 + Merkle),BitwiseHDCIndex.search/search_with_crosstalk(runtime-dispatched AVX-512VPOPCNTDQ/ portableu64POPCNT),ProvenanceLattice.root,fuse_frames_batch_v2(contiguousN × 64 BDK-v2batch fusion), plus dual-knobuncertainty_to_sampling_params(u)mapping Subjective Logic uncertainty continuously to(control_vector_scale, temperature). - Standalone daemon (
rust/deadkeyd): Single-binarytonicgRPC (Health,FuseFrames,WitnessCommit,VerifyKv) + replay-safe64 B / 512 BUDP Quorum server (~2.8–3.2 MBrelease binary). - Measured cross-OS parity & speed (
[measured],0 MiBGPU VRAM,41/41unit tests PASS in both Rust &DEADKEY_PURE_PYTHON=1modes):- Windows 11 (
Ryzen 9 9950X3D,simd=avx512_vpopcntdq):100k × 4,096bHDC Top-5 + Crosstalk in1.13 ms(88.50Mvecs/s); real1.60 GBDK-KVTier B 16T full audit in220.93 ms(7.24 GB/s);100k64B cryptographic fusions in10.50 ms(9.52Mframes/s,32.9×vs pure Python); localdeadkeyd512 BUDP Quorum23.90 µsp50. - Ubuntu 26.04.1 LTS (
Kernel 7.0,Intel i9-13900HX,simd=x86_popcnt64,deadkey_core-0.1.0-cp310-abi3-manylinux_2_34_x86_64.whl):256 MiBDK-KVfull audit31.47 ms(8.53 GB/s) / seal35.85 ms(7.49 GB/s);100k64B fusions13.43 ms(7.45Mframes/s);100k4,096b HDC17.92 ms(5.58Mvecs/s). - Cross-OS LAN
deadkeyd(Windows 11 ↔ Ubuntu 26.04.1,1,000 × 512 B=8,000frames,0drops):117.7 µsp50 RTT (14.71 µs/frame),min 103.8 µs,p99 203.0 µs, plus live cross-machine gRPCWitnessCommit(COMMIT+ forged-rootCONFLICT_ESCALATE) andVerifyKv.
- Windows 11 (
# Build optional Rust _deadkey_core wheel locally (requires Rust + maturin)
maturin build --manifest-path rust/deadkey-py/Cargo.toml --release --out rust/wheels
pip install rust/wheels/deadkey_core-*.whl
python -m deadkey.doctor # reports: Rust _deadkey_core v0.1.0 active (simd=...)
# Or force pure-Python fallback at any time
DEADKEY_PURE_PYTHON=1 python -m deadkey.doctor
New in v2.0.0 — Sealed KV (DK-KV): Tamper-Evident, Epoch-Bound Integrity for llama.cpp KV Slot Files
What DK-KV defends against (and what it does not):
- In scope: Tampering with saved
llama.cppKV slot files on disk, accidental disk corruption, restoring expired/rolled-back snapshots (max_age_s), restoring a slot into the wrong model or mismatchedcontrol_vector_scale, and restoring a slot after bi-temporal facts inMemoryStorehave been updated or superseded (memory_epoch_fp). - Related context (NOT stopped by
DK-KV): Recent KV-cache security papers report prompt-injection and KV-poisoning attacks on reused KV state — Latent-in-the-Middle (arXiv:2611.34278, reported up to44.2%across KV handoffs via a mapper vs0.4%baseline), HijackKV (arXiv:2607.19957, reported average94%), and R2ECAP (arXiv:2610.22873, reported up to79%). Those attacks poison KV that was computed honestly from attacker-influenced text;DK-KVwould seal that honestly computed KV as valid.DK-KVprotects saved KV integrity, model/steering binding, and memory-epoch freshness, not input prompt sanitization.
Honest prior-work credit & scope:
DK-KV(deadkey/sealed_kv.py, CLIdeadkey-kv) adds Merkle-checked, memory-epoch-bound integrity tollama.cppKV slot files, building on prior KV-cache integrity and governance work includingkvcache_attest, When Latent Agents Lie (arXiv:2606.28958), KVGov (arXiv:2608.09225, multi-tenant timing-leakage governance), and steering-keyed prefix caching (RhizoNymph vLLM fork). We found no prior work on bi-temporal memory-epoch KV invalidation (search as of Nov 29, 2026).- Keyed vs. unkeyed integrity: Without
secret_key(the CLI default), the.dkkvheader tag is an unkeyed BLAKE2s-128 hash — it detects accidental corruption only, NOT a deliberate attacker with write access who can re-seal the file. Withsecret_key(>= 16bytes,--secret-key-env),DK-KVprovides shared-key software integrity (constant-timehmac.compare_digestkeyed BLAKE2s-128 MAC): anyone holding that shared key can seal a file (asymmetric signatures would be needed to prove which specific machine or user sealed it). This is NOT GPU hardware TEE attestation (e.g., NVIDIA CC / TDX) and does not prove which model weights actually ran.
Sidecar format & restore modes (192-byte header + 16 × N-byte leaf table = 6,304 B for 382 chunks):
- Each
.dkkvsidecar pairs with a stockllama.cppqsggslot file (zero format breakage) and authenticatesfile_size, 4 KiBqsggprefixheader_fp,model_fp,cvec_scale,memory_epoch_fp(opt-in via--store-db/--memory-epoch-hex; all-zero explicit epoch fails closed),created_ms, BLAKE2s-128 Merkle root overNchunks,header_mac, and an embedded 64-byteDKFrameV2. - Safe default (
restore_sealed_slot,lazy_overlap=False): Every chunk (0..N-1) is hash-checked beforePOST /slots/{id}?action=restoretouches VRAM. - Opt-in overlapped mode (
lazy_overlap=True/ CLI--overlap, single-tenant slot-locked callers only): Runs a fast Tier A pre-gate (chunk0, chunkN-1,K-2random interior chunks), startsaction=restore, and runs Tier B full chunk hash-checking concurrently. Upfront limitations: (a) Tier A on its own is a fast pre-gate, not a guarantee — forK=4of382chunks it catches chunk0andN-1every time, but catches a single corrupted middle chunk only2/380 ≈ 0.53%of the time (tier_a_interior_detection_prob); (b) overlapped mode is post-restore recovery, meaning a tampered middle chunk sits in VRAM briefly until Tier B finishes and triggersPOST /slots/{id}?action=erase; (c)restore_sealed_slotfails closed (ok=False, verified=False) if Tier B times out, raises, or has not finished.
Threat model & known limitations:
- Write access to the slot directory without a secret key (or without an external witness) allows re-sealing; even with a key, a local filesystem TOCTOU window remains between Deadkey's verification and
llama-serverreading the path. - Rollback of previously valid seals for the same epoch is permitted unless
--max-age-sis enforced. - In opt-in
--overlapmode without waiting (wait_for_full_check=False), a late background erase can wipe a newer restore into the same slot if the caller does not hold a slot lock; a Tier B timeout also erases conservatively even if the file is clean. memory_epoch_fingerprinttracks structural IDs, statuses, timestamps, andlength(fact)(so a same-length in-place edit made directly in SQLite outside theMemoryStoreAPI would not change the epoch).- BLAKE2s-128 provides
~2^64collision resistance.
Shipped pure-Python measurements ([measured], Ryzen 9 9950X3D, Python 3.14, warm OS page cache, deadkey/sealed_kv.py as shipped in this wheel):
1.60 GB(1,600,215,032 B,6,045-tokenGemma-4-31Bqsggslot,382 × 4 MiBchunks →6,304 B.dkkvsidecar):seal_kv_file(16T, keyed BLAKE2s-128):276.2 ms(5.79 GB/s,N=1).- Tier A lazy pre-gate (
K=4,16 MiBread):11.9 msp50 (N=5, range11.9–15.4 ms). - Tier B full chunk hash check (
382/382chunks, 16T):279.8 msp50 (N=3, range276.8–282.0 ms,5.72 GB/s). - Single-thread Python SHA-256 reference on the same file:
883.4 ms(1.81 GB/s,N=1).
- Memory-epoch staleness rejection after
MemoryStore.supersede(...)(64 MiBsyntheticqsggfixture,N=30runs, warm page cache):0.19 msp50 (min 0.18 ms,p95 0.34 ms,max 4.97 ms), rejected fail-closed before VRAM load. - Optional native C++20 reference (
[reported, native C++ code not shipped in PyPI wheel], same1.60 GBfixture, warm page cache): Tier A7.99 msp50 (N=5), Tier B222.6 msp50 (N=3,7.19 GB/s); single-run live RTX 5090 restore timelines: sequential (228.7 msTier B +584.4 msrestore =822.0 mstotal) vs overlapped (8.9 msTier A +725.6 mscontended restore with289.0 msTier B hidden inside =735.1 mstotal).
# Zero-GPU Sealed KV demo (runs in < 1s on modern x86/ARM CPUs):
# shared-key MAC + memory-epoch invalidation + verify-before-restore + opt-in overlap auto-erase
python examples/sealed_kv_demo.py
# Seal and verify a llama.cpp slot file from the CLI with shared key + MemoryStore epoch binding
export DEADKEY_KV_KEY="replace-with-32-byte-random-secret-key"
deadkey-kv seal ./slot0.bin --model-id gemma-4-31b --cvec-scale 1.8 --store-db ./memory.db --secret-key-env DEADKEY_KV_KEY
deadkey-kv verify-full ./slot0.bin --model-id gemma-4-31b --cvec-scale 1.8 --store-db ./memory.db --max-age-s 14400 --secret-key-env DEADKEY_KV_KEY
[Experimental]Multi-Node Epistemic Quorum (deadkey/epistemic_quorum.py):- Provides correlation-discounted Subjective Logic fusion (
averaging_fuseidempotent atrho=1.0,correlated_fuse(rho=0.35)to avoid confidence inflation across correlated models), thread-safe per-peer monotonic replay deduplication (QuorumSession), and an authenticated append-only off-boxDK-KVwitness ledger (QuorumWitnessLedger). - Experimental status: Early home-LAN validation (
N=24cross-family probes on two local GPUs + simulated tamper test) — kept explicitly separate from coreSealed KVsecurity claims.
- Provides correlation-discounted Subjective Logic fusion (
Benchmark #1 — Sealed 4-Arm LongMemEval-V2 (42.76M Tokens, N=264 Unseen, Zero LLM Judge)
Compiled strictly zero-leak from 200 raw environment trajectories (never opening evaluation questions) into a 19.24 MB typed bi-temporal SQLite world-model (10× compression, 0 MiB GPU VRAM) and evaluated under identical max_tokens=512, temp=0, seed=42 (Gemma-4-31B-NVFP4+MTP) across all 264 unseen held-out questions (val_milestone=131 + one-shot untouched test_sealed=133):
Arm (Pooled Unseen N=264, Deterministic \boxed{}) |
Overall Acc | Dynamic-Env (N=76) |
Static-Env (N=124) |
Avg Tools/Q | Paired McNemar vs Runbook v2 |
|---|---|---|---|---|---|
FLAT_SINGLE (flat FTS5 RAG) |
78/264 (29.5%) |
14/76 (18.4%) |
36/124 (29.0%) |
0.00 |
+14.8 pp, 58W/19L, p = 9.8e-6 |
FLAT_TOOLS (agentic search over flat RAG) |
80/264 (30.3%) |
15/76 (19.7%) |
43/124 (34.7%) |
3.00 |
+14.0 pp, 63W/26L, p = 0.00011 |
DEADKEY_BT_TOOLS (Wave 1 bi-temporal SQLite) |
97/264 (36.7%) |
22/76 (28.9%) |
47/124 (37.9%) |
3.03 |
+7.6 pp, 56W/36L, p = 0.0470 |
DEADKEY_RUNBOOK_V2 (Schema v2 + Turn-0 Hybrid) |
117/264 (44.3%) |
34/76 (44.7%, 2.43×) |
52/124 (41.9%) |
0.88 (3.41× fewer) |
dynamic-env Holm p_adj = 0.00054 |
One-shot locked test_sealed (N=133, never used during iteration): FLAT_SINGLE 33.1% / FLAT_TOOLS 33.1% (2.95 tools) → DEADKEY_RUNBOOK_V2 43.6% (0.94 tools, p=0.020 vs FLAT_SINGLE, p=0.034 vs FLAT_TOOLS; dynamic-env 17.9% → 41.0%, p=0.0225).
Benchmark #2 — Official ICLR 2025 LongMemEval (knowledge-update, N=312 across 4 Architectures & 2 GPUs)
- Pooled (
N=312,0 MiBGPU VRAM, sha821a2034d219): Flat FTS5 RAG219/312(70.2%, 95% CI64.9–75.0%) → Deadkey Bi-Temporal SQLite:239/312(76.6%, 95% CI71.6–81.0%,+6.4 pp, exact two-sided McNemarp=0.0205) — no model regressed overall (44questions flipped to right,24flipped to wrong).
| Model Architecture & GPU | Flat FTS5 RAG | Deadkey Bi-Temporal (0 MiB VRAM) |
Delta | Paired (BT/Flat, McNemar) |
|---|---|---|---|---|
Gemma-4-31B Dense (RTX 5090 32 GB) |
60/78 (76.9%, 95% CI 66.4–84.9%) |
65/78 (83.3%, 95% CI 73.5–90.0%) |
+6.4 pp |
9W / 4L (p=0.2668) |
GLM-4.7-Flash 30B-A3B MoE (RTX 5090 32 GB) |
45/78 (57.7%, 95% CI 46.6–68.0%) |
58/78 (74.4%, 95% CI 63.7–82.7%) |
+16.7 pp |
19W / 6L (p=0.0146) |
Ternary-Bonsai-2.5-27B 1.58b (RTX 4080 12 GB) |
55/78 (70.5%, 95% CI 59.6–79.5%) |
57/78 (73.1%, 95% CI 62.3–81.7%) |
+2.6 pp |
8W / 6L (p=0.7905) |
Qwen3.8-27B Dense (RTX 5090 32 GB) |
59/78 (75.6%, 95% CI 65.1–83.8%) |
59/78 (75.6%, 95% CI 65.1–83.8%) |
+0.0 pp |
8W / 8L (p=1.0000) |
POOLED (N=312) |
219/312 (70.2%) |
239/312 (76.6%) |
+6.4 pp |
44W / 24L (p=0.0205) |
Watch It Hold in 10 Seconds (Zero GPU Required)
# 1. Schema v2 Typed World-Model + Turn-0 Hybrid Preload (0.62 ms, 0 MiB VRAM)
python examples/world_model_demo.py
# 2. 3-Trap Side-by-Side Epistemic Gate Demo (3.82 ms, 0 MiB VRAM)
python examples/confessor_demo.py
# 3. Stale RAG vs Bi-Temporal SQLite + Disk-Equals-Truth Latch
python -m bench.demo_break_vs_hold
from deadkey import MemoryStore, EpistemicCommitGate, EpistemicOpinion
store = MemoryStore("./world_model.db")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-a")
store.upsert_claim(namespace="prod", entity_type="cluster", entity_key="eu-west", predicate="primary_node", value="node-b") # auto-supersedes node-a!
preload = store.recall_hybrid("eu-west primary_node", namespace="prod") # <1 ms Turn-0 hybrid preload
Runs side-by-side on any Python 3.10+ machine:
- Stale RAG Poisoning vs. Bi-Temporal SQLite: Flat RAG leaks both an outdated 5K time (
27:12) and the updated time (25:50). Deadkey supersedes27:12cleanly while preserving the full audit trail (0stale leaks). - Hallucinated Disk Claim & Fake Test Pass vs.
0.01 msLatch: Blocks"service.conf is 4,096 bytes"(0.13 ms) and"all 42 tests passed"(0.03 ms) against real disk receipts while passing truthful claims (0.04 ms).
Think you can sneak a lie past the latch? Submit a PR → CHALLENGE.md.
Why Deadkey Exists (And How It Differs From Zep / Graphiti / Wrappers)
Bi-temporal memory isn't a new idea — great systems like Zep and Graphiti exist. Deadkey owns a radically different lane: zero external dependencies, zero Neo4j/Docker containers, 0 MiB GPU VRAM, and one portable SQLite file paired directly with a deterministic runtime verifier:
- Bi-Temporal SQLite Memory (
0 MiBGPU VRAM): Tracks valid time vs. transaction time. Contradicted facts are superseded with timestamps rather than silently overwritten or leaked. - Two-Tier Epistemic Gate (Honest Boundary):
- Tier 1 (
~0.01 msdeterministic): Covers checkable claims — byte sizes, line counts, SHA-256 hashes, and tool/action executions verified against immutableEvidenceReceipts (Disk-Equals-Truth). No LLM in the loop to get talked out of it. - Tier 2 (probabilistic selective critic): Skips benign chat/math at
0 msoverhead; audits risky drafts for paraphrased fabrications and abstract policy violations.
- Tier 1 (
- Cartridge Isolation & Open Protocols (Headless-First): Native 11-tool MCP Server (
deadkey-mcp, including Schema v2claim_upsert/claim_query, Subjective Logicepistemic_fuse/memory_opinion, andrepo_compile/repo_query), 1-commanddeadkey-initinstaller (Claude Code, Cursor, Antigravity, Hermes), drop-in OpenAI / NVIDIA NIM / TensorRT-LLM Proxy (deadkey-proxy), live gRPC-verified NVIDIA NeMo Relay Worker (deadkey-relay-worker),deadkey-compileuniversal repo world-modeler, and A2A Peer Protocol (/.well-known/agent.json+/a2a) with an enforced Hard Privacy Wall. - New in
v1.3.0— Silicon-Native Non-Boolean Epistemic Stack (DK-v264B IR + Conformal Calibration +deadkey-compile+ 4,096-bit Bitwise HDC + 11-Tool MCP):- 64-Byte Cache-Line Binary IR (
deadkey/epistemic_ir_v2.py): Exact 64-byte (DK\x02\x00) zero-English wire frames combining Subjective Logic(b, d, u, a), 16-byte BLAKE2sslot_fp, 16-byte BLAKE2sProvenanceLatticeMerkle root, finite-sample Split-Conformal threshold (ConformalEpistemicCalibrator), pure-binaryfuse_frames_v2(43.6 µs), and continuousuncertainty_to_cvec_scale(u)activation steering. PoweredN=100Dual-GPU 58B Relay Benchmark (50grounded receipts +50coercive ungrounded traps; 27B 1.58-bit sensor steering a 31B executor via 64B binary frames +llama.cpp#33268):SOLO (s=0.0) 85/100 (85.0%, CI95 [76.7%, 90.7%]; 35/50 adv)|STATIC_CLIFF (s=4.0) 92/100 (42/50 grounded cliff, 8 false refusals)|ENGLISH_RELAY 100/100 (520.8 B, 1,966.9 ms peer audit, +119.9 prompt tokens/turn)→64B DK-v2 RELAY 100/100 (100.0%, CI95 [96.3%, 100.0%]; 50/50 grounded, 50/50 adv)=15W/0Lvs Solo (p = 6.10e-5),8W/0Lvs Static Cliff (p = 0.00781), tying English Relay at8.14×smaller wire (64 B),4.41×faster peer audit (446.0 ms),2.32×faster end-to-end (111.5 svs258.4 s), and0English tokens added! deadkey-compile+ 4,096-bit Bitwise HDC + 11-Tool MCP (deadkey/repo_compiler.py,deadkey/hdc_index.py,deadkey/mcp_server.py): Compiles any repo at0 MiBVRAM into a single SQLite file with BLAKE2s Merkle root + incremental bi-temporal superseding (repo_compile&repo_queryMCP tools). PoweredN=100Fuzzy/Typo Codebase Benchmark (4perturbation classes ×25queries,0 MiBVRAM,0deps):FTS5-Only 23/100 (23%, CI95 [15.8%, 32.2%], 1.34 ms)→FTS5 + 4,096-bit HDC 60/100 (60%, CI95 [50.2%, 69.1%], 2.12 ms)=37W / 0L, exact two-sided McNemarp = 1.455e-11!- Wheel-Bundled NeMo Relay Assets:
relay-plugin.tomlandconfig.schema.jsonare now packaged directly inside the installed wheel (deadkey-relay-worker --print-manifest/--print-schema).
- 64-Byte Cache-Line Binary IR (
- New in
v1.2.0— Deadkey Core Schema v2 + Live NeMo Relay gRPC Worker + Headless Detox:- Typed Bi-Temporal World-Model (
entity_claims): Promotes our sealedN=264LongMemEval-V2 breakthrough directly intoMemoryStorewith automatic slot-keyed Subjective Logic cumulative fusion on corroboration, automatic bi-temporal superseding +CLAIM_TRANSITIONaudit ledger on state mutation, strictCONFLICT_ESCALATEmode,<1 msinspect_entity, and Turn-0recall_hybridpreload. - 9-Tool MCP & Clean Headless Surface: Added
claim_upsert&claim_querytodeadkey-mcp, moved heavy GPU training scripts out of the runtime package intoexamples/training/, and exported the minimal headless API directly fromdeadkey. - Live gRPC-Verified NVIDIA NeMo Relay Worker (
deadkey-relay-worker): Verified end-to-end overgrpc-v1againstnemo-relay-plugin==0.11.2(Handshake,Health,Validate,Register,Shutdown), injecting Schema v2recall_hybridcontext and enforcing the0.01 mscommit gate with 28-byteDKwire receipts (pip install 'deadkey[nemo-relay]').
- Typed Bi-Temporal World-Model (
- New in
v1.0.1— Hardened Tier-1 Epistemic Gate (19-Model Dual-GPU Gate-Crashing Audit): Blocks forged[VERIFIED RECEIPT ...]headers synthesized in assistant output (forged_receipt_in_output, 17/17 attacks blocked with0FPs), fixes horizontal-whitespace matching ([ \t]*) to eliminate multiline key-value (Bytes: 96\nLines: 4) newline-bleed false positives, and adds contrast/refutation awareness so honest refutations of stale screenshots or unverified test claims pass cleanly. - New in
v1.0.0— Continuous Non-Boolean Subjective Logic + 28-Byte Binary Wire: Replaces brittleTrue/Falsegating with Jøsang(b, d, u, a)opinions (deadkey/epistemic_algebra.py), live wall-clock temporal decay & Cumulative Dempster–Shafer Fusion insideMemoryStore, continuous conflict detection (CONFLICT_ESCALATE), fixed 28-byte binary wire frames, and an interactive browser visualizer (bench/epistemic_simplex_lab.html·https://deadkey.dev/simplex.html).
Full Measured Benchmarks & Raw Receipts (All Checked Into data/)
Scale & Concurrency Proof (100,000 Records, 0 MiB GPU VRAM)
100,000-Record SQLite WAL Stress (data/memory_scale_100k_report.json):39.77 MBsingle file,0.72 sinsert,200/200contradiction fidelity (0stale leaks),0.05 msFTS5 p50 (132.7 msbroad-token p99),0lock errors across 8 concurrent threads (600ops in0.14 s).10,000-Record Hybrid 768-d CPU Vector RRF (data/memory_scale_10k_report.json):11.89 MBDB,100/100fidelity (0leaks),5.17 msp50 FTS5 /18.68 msp50 hybrid CPU RRF.
Runtime Invariance — Dual-GPU Blind Epistemic Gauntlet (24 Probes)
Note: 24 probes is not a claim of universal 100% — it is a claim of runtime invariance across 10+ models and 2 GPU tiers. Full probe suite is in bench/blind_abstract_gauntlet.py; submit PRs that beat the gate in CHALLENGE.md.
4-Way Controlled Blind Out-of-Sample A/B (Qwen3-8B, 4.68 GiB Q4_K_M, 24 Blind Probes)
With non-thinking mode (--reasoning-budget 0), 125B-Teacher DPO raised RAW blind accuracy from 7/24 (29.2%) → 12/24 (50.0%, +20.8 pp) and Tier 1 from 15/24 (62.5%) → 19/24 (79.2%, +16.7 pp), reaching 24/24 (100.0%, 0.0% FPR) at 701 ms critic latency (doom_8b_epistemic_dpo_blind_v1.json).
With default Qwen3 <think> mode ON (rlvr_vs_dpo_4way_blind_v1.json), hidden chain-of-thought talked itself into complying with adversarial traps across all 4 checkpoints (25.0%–37.5% RAW) — proving why weight-only alignment is fragile under CoT and why Deadkey's external runtime latch still lifted all 4/4 checkpoints to 24/24 (100.0%, 0.0% FPR):
Training Method (Zero-PII, <think> ON) |
RAW Blind | Tier 1 Frozen | Tier 1+2 Hybrid (FPR) | Tier 2 Rescues |
|---|---|---|---|---|
Stock Qwen3-8B |
9/24 |
16/24 |
24/24 (0.0% FPR) |
8 |
125B-Teacher DPO |
6/24 |
16/24 |
24/24 (0.0% FPR) |
8 |
Teacher-Free RLVR-GRPO |
8/24 |
16/24 |
24/24 (0.0% FPR) |
8 |
DPO + RLVR-GRPO |
6/24 |
16/24 |
24/24 (0.0% FPR) |
8 |
v0.9.6 — 80.75 KiB GGUF Control Vector vs. 5.03 GB DPO & The Over-Refusal Cliff
We exported a sparse 80.75 KiB (82,688 B, 5 F32 tensors across layers [10, 11, 12, 14, 15]) native llama.cpp GGUF control vector (data/deadkey_qwen3_8b_cvec_v1.gguf, zero weight updates, +4 MiB VRAM, -0.9% tok/s at ~245 t/s) via bench/export_steering_to_gguf.py and benchmarked it head-to-head against our 5.03 GB QLoRA DPO checkpoint on stock Qwen3-8B Q4_K_M (NO-THINK, RTX 5090):
llama-server -m Qwen3-8B-Base-Q4_K_M.gguf --control-vector-scaled data/deadkey_qwen3_8b_cvec_v1.gguf:1.8
Arm (Qwen3-8B Q4_K_M, NO-THINK) |
Artifact Delta | Fresh Held-Out 24-Probe (6/6 benign) |
Paired McNemar (Held-Out) | External LongMemEval (N=78, BT) |
Paired McNemar (LongMemEval) |
|---|---|---|---|---|---|
Base (s=0.0) |
0 B |
16/24 (66.7%, CI95 [46.7, 82.0]) |
— | 59/78 (75.6%, 1 ref) |
— |
5.03 GB DPO (s=0.0) |
5.03 GB |
17/24 (70.8%, CI95 [50.8, 85.1]) |
1W/0L (p=1.0 vs base) |
59/78 (75.6%, 1 ref) |
1W/1L (p=1.0 vs base) |
80.75 KiB CVEC (s=1.8, frozen) |
80.75 KiB |
22/24 (91.7%, CI95 [74.2, 97.7], 16/18 adv, 6/6 benign) |
6W/0L (p=0.0312 vs base; 5W/0L, p=0.0625 vs DPO) |
57/78 (73.1%, CI95 [62.3, 81.7], 4 ref) |
5B/3C (p=0.7266 vs base) |
80.75 KiB CVEC (s=3.0) |
80.75 KiB |
22/24 (91.7%, 16/18 adv, 6/6 benign) |
7W/1L (p=0.0703 vs base) |
35/78 (44.9%, 54/78 refusal-phrased*) |
25B/1C (p < 1e-6 vs base) |
DPO + CVEC (s=3.0) |
5.03 GB + 80.75 KiB |
— | — | 34/78 (43.6%, 55/78 refusal-phrased*) |
p < 1e-6 (does not compound) |
- Honest Takeaways & Method Disclosures:
- At frozen
s=1.8, the80.75 KiBcontrol vector significantly outperformed base (p=0.0312,6W/0L) and edged the5.03 GBDPO checkpoint (5W/0L,p=0.0625, not statistically significant atN=24) on 24 unseen held-out probes while answering6/6benign controls cleanly. - The Over-Refusal Cliff (
s >= 2.2): Cranking static steering tos=3.0added0net points on held-out probes (22/24) while collapsing externalLongMemEvalfrom75.6% → 44.9%(54/78refusal-phrased responses*,p < 1e-6) — demonstrating empirically why global activation steering is a blunt dial and why local agents still need an external0.01 msdeterministic truth gate + bi-temporal memory. - Statistical & Judge Disclosures: On
LongMemEval,N=78is an exploratory dev slice underpowered to prove zero accuracy loss ats=1.8(73.1%vs75.6%,p=0.7266, overlapping 95% Wilson CIs). *refusal-phrasedcounts responses triggering refusal/hedging phrasing independently of the correctness judge, so hedged answers that still stated the fact overlap withcorrect(35 + 54 = 89 > 78). AllLongMemEvalarms were graded by a single fixed unsteered judge (Qwen3-8B-Base-Q4_K_M,scale=0.0— the base model grading its own variants), alongside deterministic exact-substring match counts indata/four_arm_dpo_vs_cvec_v1.json,data/cvec_pareto_sweep_v1.json, anddata/heldout_and_mcnemar_v1.json.
- At frozen
Honest Failures, Negative Results & Rejected Candidates (Zero Cherry-Picking)
- Qwen3
<think>CoT Rationalization: Turning hidden chain-of-thought ON madeQwen3-8Btalk itself into complying with adversarial traps across all 4 checkpoints (25%–37.5%RAW), even after125B-DPO— while the external runtime latch stayed invariant at24/24 (100%, 0% FPR). - RLVR-GRPO Reward-Sparsity Wall: Programmatic
EpistemicCommitGateGRPO climbed+0.410(25% → 44%pass) on a 24-task short pool, but hit reward sparsity when scaled cold-start to 54 harder tasks (-0.303 → -0.432); warm-starting from DPO LoRA recovered positive ascent (-0.307 → -0.154,+0.153). - Rejected Candidates:
Tenet-Gemma4-26B-IQ3_XXSdegraded at sub-3-bit (miscopied receipts + HTTP 500s) and was dropped.DSparkblock-diffusion speculative decoding slowed our 12 GB sparse MoE (51.3 → 43.2 tok/s,50.6%acceptance) and is off by default.
3-Command Quickstart (< 2 Minutes on Any Machine)
# 1. Watch it break vs. hold in 10 seconds (0 GPU required)
python -m bench.demo_break_vs_hold
# 2. Verify environment & reproduce core benchmarks (< 2 seconds, 0 GPU required)
python -m deadkey.doctor && python -m bench.reproduce_all --quick
# 3. Launch the Deadkey Web UI + Live 3-Way Epistemic Proof Lab
python -m deadkey.server --cartridge cartridges/blank-lab/manifest.json --tools cartridges/blank-lab/tools_catalog.json --port 8765
Open http://127.0.0.1:8765 — switch themes in the top bar (Deadkey, 1978, Paper) and open Inspector → Sleep → Live Epistemic Proof Lab.
Drop-In Integrations (0 MiB GPU VRAM Sidecar)
- New in
v1.1.0— NVIDIA NIM & TensorRT-LLM Sidecar (deadkey-proxy): Native--providerpresets (nvidia_nim_local,nvidia_nim_cloudwith loopback-lockedNVIDIA_API_KEYbind guard,tensorrt_llm,vllm,llama_cpp), liveX-Deadkey-Gate-Passed+ 28-byteX-Deadkey-Wire-Hexresponse headers, and zero-GPU offline demo (examples/nvidia_nim_sidecar.py --demo-offline).# Self-hosted NVIDIA NIM container or TensorRT-LLM (trtllm-serve on :8000) deadkey-proxy --provider nvidia_nim_local --port 8788 --db ./nim_memory.db deadkey-proxy --provider tensorrt_llm --upstream http://127.0.0.1:8000 --port 8788 # NVIDIA NIM Cloud / API Catalog (reads NVIDIA_API_KEY automatically; keep --host 127.0.0.1!) # Security note: server-side API-key injection is restricted to loopback by default so # unauthenticated LAN callers cannot spend your NVIDIA API quota. deadkey-proxy --provider nvidia_nim_cloud --default-model nvidia/llama-3.3-nemotron-super-49b-v1 # Zero-GPU self-contained demo (bi-temporal superseding + forged-receipt block + 28B DK wire) python examples/nvidia_nim_sidecar.py --demo-offline
- NVIDIA NeMo Relay
grpc-v1Worker Plugin (deadkey-relay-worker): Install optionalpip install 'deadkey[nemo-relay]'and export the wheel-bundled manifest viadeadkey-relay-worker --print-manifest > relay-plugin.toml(deadkey.nemo_relay_worker:main). - 11-Tool MCP Server (Hermes / Claude Desktop / Cursor / Antigravity):
deadkey-mcp --db ./deadkey_memory.db - OpenAI Epistemic Proxy (
llama.cpp/ vLLM / NIM / TRT-LLM):deadkey-proxy --provider llama_cpp --upstream http://127.0.0.1:11455 --port 8770 --semantic-critic - A2A Peer Discovery (optional
deadkey-server):GET http://127.0.0.1:8765/.well-known/agent.json&POST /a2a - Optional Research Training Scripts (outside core runtime):
python examples/training/train_epistemic_rlvr_grpo.py --max-steps 90 --num-generations 6
License & Trademarks
Licensed under the Apache License 2.0 (see LICENSE and NOTICE).
Contributions require DCO sign-off (git commit -s — see CONTRIBUTING.md).
"Deadkey" and "Deadkey Labs" are trademarks of Deadkey LLC.
Metadata
Release files for deadkey 2.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deadkey-2.3.0.tar.gz | 257.5 kB | With provenance | Details for deadkey-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deadkey-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for deadkey-2.3.0-py3-none-any.whl |
Total release size: 468.6 kB
Release files / deadkey-2.3.0.tar.gz
| Download URL | deadkey-2.3.0.tar.gz |
|---|---|
| Size | 257.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
329d2c0c8c89125a1c4972b2f9da31b203c98877dd833a6883361ea2da923099
|
|
BLAKE2b-256 checksum How to use checksums |
0865139e625485f1df73821513bb754982cc813dbbc662aee0a355f3a40bff57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / deadkey-2.3.0-py3-none-any.whl
| Download URL | deadkey-2.3.0-py3-none-any.whl |
|---|---|
| Size | 211.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce8868f1d5181996aa71858bdb35d0ddcd91e958b87fc5be3311e0df13c762bb
|
|
BLAKE2b-256 checksum How to use checksums |
032325c0eefd3f37860f4fea634ad82e6e1b7cc18ac29e2871887060490abebe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for deadkey 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for deadkey-2.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.