The Code of Hammurab(AI): A Type-Theoretically Enforced Code of Conduct for Preventing Unauthorized State Mutations in Autonomous Agents via Null-Space Projection and Zero-Gradient Gating.

Current autonomous agent safety relies on reactive post-hoc filtering, leaving systems vulnerable to continued costly security failures driven by unbounded operational edge cases. Inspired by ancient legal frameworks that established strict liability through binding contracts, The Code of Hammurab(AI) enforces agent safety as a compile-time invariant via cryptographic provenance. We utilize the Lean 4 interactive theorem prover to formally verify state boundary invariance, alongside the mathematical soundness of zero-gradient gating and orthogonal null-space projections. To translate these verified mechanics to neural hardware, we provide a corresponding PyTorch Systems Architecture blueprint.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-28
DOI
https://doi.org/10.5281/zenodo.23005159
Primary Topic
Adversarial Robustness in Machine Learning
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
preprint

The Code of Hammurab(AI): A Type-Theoretically Enforced Code of Conduct for Preventing Unauthorized State Mutations in Autonomous Agents via Null-Space Projection and Zero-Gradient Gating.

Jonathan ƒ(n) Reed
Zenodo (CERN European Organization for Nuclear Research)
Adversarial Robustness in Machine Learning
preprint

The Code of Hammurab(AI): A Type-Theoretically Enforced Code of Conduct for Preventing Unauthorized State Mutations in Autonomous Agents via Null-Space Projection and Zero-Gradient Gating.

Jonathan ƒ(n) Reed
preprint en

Abstract

Current autonomous agent safety relies on reactive post-hoc filtering, leaving systems vulnerable to continued costly security failures driven by unbounded operational edge cases. Inspired by ancient legal frameworks that established strict liability through binding contracts, The Code of Hammurab(AI) enforces agent safety as a compile-time invariant via cryptographic provenance. We utilize the Lean 4 interactive theorem prover to formally verify state boundary invariance, alongside the mathematical soundness of zero-gradient gating and orthogonal null-space projections. To translate these verified mechanics to neural hardware, we provide a corresponding PyTorch Systems Architecture blueprint.

Zenodo (CERN European Organization for Nuclear Research)
Peace, Justice and strong institutions
Adversarial Robustness in Machine Learning
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.