Formal verification of Engram/Conditional Memory — safety review request

#59
by laserbeans - opened

Hi DeepSeek team,

I’m sharing a Lean formalization of conditional memory / Engram-style architectures that may be relevant to safety and verification of memory-augmented models:

https://github.com/ganzuul/LaserCortex/tree/main/LaserCortex/ConditionalMemory

The repository includes:

EngramReference.lean — properties of the reference implementation (hash folding, locality, gate bounds).
GramDictionary.lean — formalization of n-gram key arithmetic, bag-channel writes, and layout.
YSystem.lean — algebraic Y-system and periodicity results.
Potential relevance: if prefill/decode can be partly replaced by deterministic conditional memory, formal properties like commutativity, locality, and bounded gates could support stronger safety arguments. I’d like the team to review whether these lemmas apply to DeepSeek’s Engram/Conditional Memory work.

Caveat: this formalizes specific components, not the full model. I’m not claiming it alone proves that a full LLM cannot hallucinate instructions. I’m suggesting it as a foundation for further verification.

Sign up or log in to comment