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
- Jonathan ƒ(n) Reed (ORCID: https://orcid.org/0009-0008-7345-1407)
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