Academic papers and research documents that influenced and continue to guide Lemma's development.
- Self-Distillation Enables Continual Learning — Core inspiration for Lemma's guide distillation system (
guide_distill). Raw memory fragments are compressed into reusable procedural knowledge, mirroring self-distillation in neural networks. - AgeMem: Agentic Memory Framework — Informed the biological memory model (confidence decay, access-based reinforcement, negative feedback). Lemma's
decayConfidence/boostOnAccess/recordNegativeHitcycle directly reflects this research.
- Self-Refine: Iterative Refinement with Self-Feedback — Basis for the feedback loop where LLMs evaluate and improve their own outputs. Relevant to
memory_feedback(positive/negative) and guide improvement suggestions. - Learning to Refine: Self-Refinement of Parallel Reasoning — Parallel reasoning patterns informed multi-fragment association tracking (
trackAssociations). - SSR: Socratic Self-Refine for LLM Reasoning — Question-driven self-improvement inspired the audit system (
memory_audit) that identifies gaps and contradictions. - Enhancing LLM Planning through Intrinsic Self-Critique — Self-critique mechanisms informed session outcome tracking and guide success rate analysis.
- Evolving LLMs' Self-Refinement via Synergistic Training-Inference — Synergy between training and inference optimization informed the dual-path memory system (static facts via memories + procedural skills via guides).
- A Survey on LLM Inference-Time Self-Improvement — Comprehensive survey covering techniques that informed the overall architecture of persistent memory as an inference-time enhancement.
- 2603.19461v1 — Additional research on LLM capability enhancement during inference.
- llm-wiki — Karpathy's LLM Wiki pattern. Inspired
memory_audit(wiki health-check), universal memory injection (always-available knowledge), and the 3-layer injection architecture. - llm-wiki-v2 — LLM Wiki v2 by @rohitg00. Extended patterns from production experience that inspired v0.8.1: privacy filtering, typed relations, topic overlap detection, injection ranking, smart session start, and query filters.
- self-improvement-architecture — Internal design notes mapping research concepts to Lemma's implementation.
| Research Concept | Lemma Implementation |
|---|---|
| Self-distillation | guide_distill — memory fragment → guide learning |
| Memory decay | decayConfidence — biological forgetting curve |
| Access-based reinforcement | boostOnAccess — confidence +0.015 on use |
| Negative feedback | recordNegativeHit — confidence -0.02 |
| Association tracking | trackAssociations — bidirectional cross-references |
| Self-critique / audit | memory_audit — orphan detection, anomaly detection |
| Knowledge compounding | guide_merge / memory_merge — consolidation |
| Always-available knowledge | Universal tool description injection |
| Session-based learning | session_start / session_end + virtual sessions |
| Privacy governance | privacy.ts — 17 regex patterns, auto-redact on ingest |
| Typed relations (v2) | memory_relate — contradicts, supersedes, supports, related_to |
| Contradiction detection (v2) | findTopicOverlaps — 40-65% similarity range suggestions |
| Lifecycle injection (v2) | Composite ranking — confidence × recency |
| Smart context loading (v2) | session_start pre-loads top-3 relevant memories |