Cognitive Scaffold: From Fluid Context to Crystallized Memory for Long-Horizon DeepResearch Agents
Idea
Cognitive Scaffold 将 long-horizon DeepResearch 的状态分为 Fluid Working Context 与 persistent Knowledge Graph:context 接近阈值时压缩成 Event Snapshot,保留轻量 Memory Note 继续推理,需要旧证据时再通过 thought-driven retrieval 回读。重点是保存实体、数值与关系,而非无限累加历史。
Research Problem
长轨迹的 raw observations 会挤占 reasoning context,普通摘要又容易丢失细粒度事实并传播 compression hallucination。论文研究如何同时控制 active context、保留可回溯的事实与结构,并让 agent 在后续推理出现缺口时主动找回相关 memory。
Insight
压缩与检索应共同设计:graph 提供定位和关系扩展,event node 中保留的 snapshot 提供事实细节。作者称其为高 fidelity memory,但训练过滤主要依赖格式、embedding similarity 和 compression ratio,因此不能把 atomic preservation 的设计目标解释为对每个数字和实体都有严格验证保证。
Method
- 达到随 folding 次数逐步增长的 token threshold 时触发 crystallization;将溢出历史转成 Event Snapshot,清理工作区后重新拼接固定 prompt、原 query、Memory Note 和 recent history。该 trigger 实际基于 token count,而不是直接估计 information density。
- 采用 Generate–Evaluate–Distill:teacher 生成 snapshots,以 XML format、原文/摘要 embedding cosine similarity 和 compression ratio 的加权分数筛选,再对 compressor 做 LoRA fine-tuning;另以相同目标搜索 compression prompt。
- 通过 Graphiti 从 snapshot 提取 entities 和 relations,写入 Knowledge Graph,并在 central event node 保存原 snapshot,兼顾可遍历结构与可读内容。
- 将当前 reasoning 转成 introspective query,Entity Path 用 semantic retrieval 加 BM25,Relation Path 扩展相关边并按 graph distance rerank;将子图作为 observation 加回 context,形成 consolidation–retrieval 循环。
Sources & Reading Scope
阅读依据:官方 PDF 正文。核读页码按 PDF 页序计数,可能与 proceedings 页码不同。
核读章节:Structure Crystallization · High-Fidelity Memory Compression via RFT · Introspective Retrieval via Thought-Driven Navigation
核读实际 threshold、RFT score 与 dual-path retrieval;区分作者的 fidelity 目标与 embedding-based proxy,不把 token trigger 写成真实信息密度检测。