The problem with binary memory
Most memory systems store facts as binary: either stored or not stored, with every stored fact treated as equally true. This fails in production because:- A user preference stored 8 months ago is treated the same as one set yesterday
- There’s no way to express that an inferred preference is less certain than a direct statement
- Contradicting information doesn’t reduce confidence in existing beliefs
Log-odds confidence
Engram represents confidence as a value in[0, 1] but updates it using log-odds arithmetic:
- Additive updates on raw probabilities break near the boundaries (0 and 1)
- Log-odds stays in the valid probability range naturally
- The same Δ has less effect when confidence is already very high or very low — which matches intuition
Confidence updates
Reinforcement
When a memory is recalled (accessed), it receives a small boost:Contradiction
When a hard contradiction is detected:Temporal update
When newer information supersedes an existing belief, the old memory is archived (confidence drops below 0.40) and a new memory is created.Decay
Unused memories decay over time. The base decay formula:effective_decay_multiplier accounts for competition from similar memories (see Lifecycle).
Calibration
A confidence of0.80 should mean the memory is correct ~80% of the time. Engram’s confidence model is designed to be calibrated — not just a relative ranking score.
This is tested in the Agent Memory Benchmark Suite 2 using Expected Calibration Error (ECE):