Skip to content

Memory: conflict-driven UpdateDelta/DeleteDelta emission for Global Adjudication (consistency maintenance) #154

Description

@se-jo-ma

Context. MemGraphRAG's Global Adjudication (consistency maintenance) needs conflict-driven resolution; its strongest ablation is that removing Conflict Resolution causes the biggest accuracy drop. In stargraph the Update/Delete delta primitives exist (UpdateDelta.replaces / DeleteDelta.replaces, memory.py:100-120) and apply_delta (sqlite_fact.py:192-222) is the only sanctioned write path into the semantic FactStore — but nothing produces conflict-driven deltas: consolidation only does intra-batch (subject,predicate) dedup and trusts rule output verbatim (embedding-similarity dedup deferred to Phase 3). Relates to #21 (promote memory stores out of POC, embedding dedup).

Proposal. Produce conflict-resolution deltas. On conflict (same subject/predicate, divergent object) emit UpdateDelta(replaces=[old_fact_id]); resolution policy = highest-confidence / most-recent. apply_delta needs no change (already UPDATE = unpin(replaces)+pin(new)).

Seat decision (needs-design). The MemoryStore Protocol's consolidate(rule) takes NO FactStore handle (memory.py:195; sqlite_memory.py:222-231 explicitly declines cross-store dedup for that reason). Realistic options:

  • (a) a NEW free function alongside kg_promotion taking (fact_store, fathom_adapter), emitting conflict deltas after scanning fact_store.query; or
  • (b) broaden the consolidate Protocol to accept an optional fact_store.

Where.

  • src/stargraph/stores/sqlite_memory.py:201-255 consolidate() + _classify_episode :258-326.
  • src/stargraph/stores/sqlite_fact.py:192-222 apply_delta.
  • src/stargraph/stores/_delta.py:42-62 _validate_delta_provenance.

Acceptance criteria.

  • Same-subject/predicate divergent-object conflicts emit a provenance-carrying UpdateDelta; resolution policy applied.
  • Synthetic resolution deltas carry non-empty source_episode_ids + rule_id (required by _validate_delta_provenance :54-60).

Caveats. Temporal-conflict detection has no data: t_valid/t_invalid are declared in the Rel DDL (ryugraph.py:69) but NEVER written (add_triple ignores props — see the tri-view schema issue). Naive O(n²) scan is the scalability concern the paper flags.


Source: arXiv:2606.00610v1 — "MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented Generation". Distilled from arXiv-research/2606.00610v1/analysis.md; file refs verified against current main by the analysis pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: roadmap gap or DX/toolingarea/storesVector/graph/fact/memory storesenhancementNew feature or requestneeds-designDesign not yet settled — please don't open a PR yetsize/L<1 week: cross-cutting feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions