openclaw - 💡(How to fix) Fix [Feature]: Parametric consolidation channel for dreaming pipeline (CLS Phase 4) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77142Fetched 2026-05-05 05:51:42
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
2
Timeline (top)
commented ×2labeled ×1

Add an optional fourth dreaming phase that encodes distilled experience into model weights (via LoRA/adapter fine-tuning), closing the generalization gap between retrieval-based recall and true parametric learning.

Root Cause

Add an optional fourth dreaming phase that encodes distilled experience into model weights (via LoRA/adapter fine-tuning), closing the generalization gap between retrieval-based recall and true parametric learning.

RAW_BUFFERClick to expand / collapse

Summary

Add an optional fourth dreaming phase that encodes distilled experience into model weights (via LoRA/adapter fine-tuning), closing the generalization gap between retrieval-based recall and true parametric learning.

Problem to solve

OpenClaw's dreaming pipeline (light/REM/deep) reorganizes and promotes memory text, but all output remains in context (C) — the model weights (θ) never change. Per Theorem 1 in "Contextual Agentic Memory is a Memo, Not True Memory" (arXiv:2604.27707), retrieval-based memory faces a provable Ω(k²) sample complexity ceiling on compositionally novel tasks that parametric learning solves in O(d).

In practice: an agent running dreaming for months has better-organized notes but zero improvement in its ability to handle novel combinations of learned concepts. Each session starts from the same frozen pretrained model. The paper calls this the "Frozen Novice Problem."

OpenClaw already has 90% of the infrastructure needed — dreaming phases produce scored, deduplicated, concept-tagged experience; the recall store tracks frequency; session corpus provides raw training data. The missing piece is encoding this output into weights via LoRA/adapter training as an async post-deep-sleep phase, with versioned checkpoints and regression guards for safe rollback.

Proposed solution

Add an optional consolidation phase to the dreaming pipeline, running after deep sleep:

Pipeline: Light → REM → Deep → Consolidation (new)

  1. Experience distillation — Select high-value dreaming output using existing recall frequency scores (minRecallCount, minScore, minUniqueQueries) and convert to training pairs (Q&A from sessions, pattern rules from REM, corrective pairs from user corrections).

  2. Adapter training — Encode distilled experience into model weights via LoRA (rank 4–16). Support two paths:

    • Local: LoRA via node-llama-cpp (already in stack) on a small model
    • API: OpenAI/provider fine-tuning endpoints
  3. Safety — Versioned checkpoints, regression guards (test against recent successful interactions before activating), auto-rollback on accuracy drop, full provenance tracking.

Proposed config:

{
  "dreaming": {
    "phases": {
      "consolidation": {
        "enabled": true,
        "method": "lora",
        "provider": "local",
        "loraRank": 8,
        "minPatternsToTrigger": 5,
        "regressionGuard": true,
        "regressionThreshold": 0.95,
        "checkpointRetention": 5
      }
    }
  }
}


### Alternatives considered

**Alternatives considered:**
Bigger context windows — Does not help. The paper proves (Theorem 1) that the generalization gap is context-window-independent. Larger context holds more notes but cannot synthesize novel concept combinations the model hasn't encoded.

Better retrieval (learned retrieval policies, reranking) — Improves recall quality for seen patterns but does not address unseen compositional combinations. The Ω(k²) coverage requirement persists regardless of retrieval optimization.

Sleep-time text compression (current approach) — OpenClaw's existing dreaming already does this well. But compressing text in an external store produces better-formatted notes; the agent is still a "well-organized novice" with frozen weights. This is explicitly addressed in the paper as insufficient (Section 3.3).

External fine-tuning workflow — Users could manually export dreaming output and fine-tune separately. This is fragile, unsupported, and loses the automated cron-based consolidation cycle that makes dreaming powerful.



### Impact

**Impact:**
Affected: All long-running OpenClaw agents using dreaming/memory-core Severity: High (architectural limitation, not a bug) Frequency: Continuous — every session runs against frozen base weights regardless of accumulated experience Consequence: Agents accumulate months of dreaming output but show zero improvement on novel compositional tasks. Users invest in dreaming configuration expecting the agent to "get smarter" but hit a provable generalization ceiling. The gap between user expectation and system capability grows over time.

### Evidence/examples

**Evidence/examples:**
Paper: "Contextual Agentic Memory is a Memo, Not True Memory" (arXiv:2604.27707) — formalizes the generalization gap with Theorem 1 (Compositional Sample Complexity Separation) and names the Frozen Novice Problem.
Empirical: Yao et al. (2026) ParamMem shows parametric storage outperforms retrieval storage, with the gap growing on novel compositional transfers.
OpenClaw observation: Agent with 3499 recall entries, 18 dream corpus files, and active dreaming (0 5 * * * for weeks) still falls back to base model reasoning on novel multi-concept queries. memory status --deep confirms healthy pipeline; the limitation is architectural, not operational.
Existing infrastructure: OpenClaw already has recall frequency tracking, concept tagging, session corpus ingestion, and cron-based async execution — all prerequisites for consolidation. Only the final LoRA/adapter step is missing.


### Additional information

[consolidation-channel-proposal.md](https://github.com/user-attachments/files/27333326/consolidation-channel-proposal.md)

extent analysis

TL;DR

Implementing an optional consolidation phase in the dreaming pipeline using LoRA/adapter fine-tuning can address the generalization gap between retrieval-based recall and true parametric learning.

Guidance

  • To address the Frozen Novice Problem, add a consolidation phase to the dreaming pipeline, which encodes distilled experience into model weights via LoRA/adapter training.
  • Configure the consolidation phase using the proposed config, including settings for loraRank, minPatternsToTrigger, regressionGuard, and checkpointRetention.
  • Implement versioned checkpoints and regression guards to ensure safe rollback in case of accuracy drops.
  • Consider using either local LoRA via node-llama-cpp or API fine-tuning endpoints for the consolidation phase.

Example

{
  "dreaming": {
    "phases": {
      "consolidation": {
        "enabled": true,
        "method": "lora",
        "provider": "local",
        "loraRank": 8,
        "minPatternsToTrigger": 5,
        "regressionGuard": true,
        "regressionThreshold": 0.95,
        "checkpointRetention": 5
      }
    }
  }
}

Notes

The proposed solution relies on the existing infrastructure of OpenClaw, including recall frequency tracking, concept tagging, and session corpus ingestion. The addition of the consolidation phase using LoRA/adapter fine-tuning is expected to address the generalization gap, but its effectiveness may depend on the specific configuration and implementation details.

Recommendation

Apply the proposed workaround by implementing the consolidation phase in the dreaming pipeline, as it addresses the architectural limitation of the current system and has the potential to improve the agent's ability to handle novel compositional tasks.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Feature]: Parametric consolidation channel for dreaming pipeline (CLS Phase 4) [2 comments, 2 participants]