Shape-Aware Three-Way Merge:用 SHACL 定义 RDF 知识图谱冲突
Shape-Aware Three-Way Merge for RDF Knowledge Graphs: The schema defines the conflict: an implementation and evaluation
做知识图谱和多智能体存储的人该看看:用 SHACL 基数约束来定义合并冲突,比 Quit Store 的上下文重叠规则少了大量人工裁决,33 个冲突全部是真阳性。作者也坦白了别名问题检不出的短板,评估写得相当克制。
一篇 arXiv 论文提出针对 RDF 三元组的三路合并方法,核心思路是用 schema 来定义冲突:无基数约束的谓词直接做集合并集,只有当 SHACL shape 限定了槽位基数、且双方修改无法同时满足该约束时才算冲突。该实现部署在生产环境的多智能体存储系统中,并与 Quit Store Context Merge 重叠规则的重实现及六种其他策略做了对比评估。
在五个合成种子数据上,shape-aware 算子识别出 33 个冲突,全部经定义冲突的同一 shapes graph 判定为真阳性,且没有三元组丢失或凭空产生,合并结果无 SHACL 违规;按槽位计数的 context-overlap 基线同样检出 33 个冲突,但需要人工回答 845 个问题。基于生产事故回放的测试集包含 105 个人工别名修复和 939 个重复值事故,结果显示三元组层面的合并无法察觉同一实体的不同命名——93 个别名修复一个都没检出。
论文还测试了 shape 契约演进场景:先合并 shape 声明可处理测试中的基数变化,但数据类型演进存在检测盲区,需靠合并后校验兜底。作者明确将主张限定为:在单一部署中,对基数冲突减少人工决策且无数据静默丢失,而非通用的合并正确性保证。
Shape-Aware Three-Way Merge for RDF Knowledge Graphs: The schema defines the conflict: an implementation and evaluation
Merging RDF serializations creates ordering conflicts and misses semantic ones. We describe and evaluate a three-way merge in which the schema defines a conflict: set algebra combines canonical triples, and a slot is contended only where a SHACL shape bounds its cardinality and both sides' changes cannot stand within that bound. Unbounded predicates union; contended slots go to a person. The same shapes graph validates the result. We do not claim the first three-way merge for RDF. Our contribution is an implementation in a production multi-agent store and an evaluation against a reimplementation of Quit Store's Context Merge overlap rule, which it extends rather than replaces, and six other strategies. Across five synthetic seeds, the shape-aware operator raised 33 conflicts, all true positives as judged by the same shapes that define them, with no triples lost or fabricated and no SHACL violations admitted. The context-overlap baseline, counted per slot, detected the same 33 conflicts but asked 845 questions. A replay built from recorded production incidents covers 105 human alias repairs (93 after excluding 12 chained pairs) and 939 duplicate-value incidents. It reproduces a triple-level limit: different names for one entity remain invisible (0 of 93 alias repairs detected, matching 0 of 21 synthetic cases). In a study of evolving shape contracts, merging shape declarations first handles the tested cardinality changes, while datatype evolution exposes a detector blind spot caught by post-merge validation. An oracle that reads no shapes agrees with the shipped operator on the facts and history of all 23 reachable single-slot cases. Under wrong shapes, a missing bound loses data silently and a spurious one only adds questions. The supported claim is fewer human decisions with nothing silently lost, for cardinality conflicts in one deployment, not general merge correctness.
This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include RAG, SHACL, knowledge graphs, Quit Store.
Source attribution: curated from arXiv cs.AI (@Steve Brown).