Context by Distinct Information: An Auditable Dirichlet-Process Working Memory for Long, Redundant Context Streams
Summary
A new working memory component, "Context by Distinct Information" (CDI), is introduced, utilizing an allocate-on-novelty cache based on a Dirichlet-process working memory. This design scales memory with distinct items rather than tokens, addressing redundancy in long context streams. The approach organizes context by task dependency: recall-carried information in a content-addressed novelty cache, summary-carried information in a recurrent state, and locality-carried information in a recency window. Empirically, novelty-gated attention achieves full-attention performance while processing about half the tokens on a character-level control. When coupled with a state-space summary, it matches full-attention coupling at reduced cost, with advantages growing for longer contexts. On next-code prediction for synthetic Medicare claims, the coupled component outperforms full attention and fixed-budget eviction policies at a thousand-event horizon. The retained memory is an inspectable table, not an opaque state.
Key takeaway
For Machine Learning Engineers designing models for long, redundant context streams, you should consider implementing a distinct-information working memory. This approach can significantly reduce token processing costs while maintaining or improving performance, especially for tasks dependent on recall-carried information. Your models will also benefit from an auditable, inspectable memory, enhancing transparency and debugging capabilities.
Key insights
A novel working memory scales context by distinct information, not tokens, improving efficiency and auditability.
Principles
- Memory should scale with distinct items.
- Context types require different memory mechanisms.
- Auditable memory enhances transparency.
Method
The proposed method allocates cache slots only for novel incoming keys, organizing context by task dependency into a novelty cache, recurrent state, and recency window.
In practice
- Implement novelty-gated attention for efficiency.
- Use content-addressable caches for recall tasks.
- Inspect retained memory for auditing.
Topics
- Context Engineering
- Working Memory
- Dirichlet Process
- Novelty Detection
- Auditable AI
- Long Context Models
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.