git-subtree-dir: vendor/ruvector git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
1.1 KiB
1.1 KiB
ADR-CE-002: Incremental Coherence Computation
Status: Accepted Date: 2026-01-22 Parent: ADR-014 Coherence Engine Architecture
Context
Recomputing global coherence energy for every update is O(|E|) where |E| is edge count. For large graphs with frequent updates, this is prohibitive.
Decision
Incremental computation with stored residuals, subgraph summaries, and global fingerprints.
Components:
- Stored residuals: Cache per-edge residuals, update only affected edges
- Subgraph summaries: Pre-aggregate energy by scope/namespace
- Global fingerprints: Hash-based staleness detection
When node v changes:
- Find edges incident to v: O(degree(v))
- Recompute only those residuals: O(degree(v) × d)
- Update affected subgraph summaries: O(log n)
Consequences
Benefits
- Single node update: O(degree × d) instead of O(|E| × d)
- Fingerprints enable efficient cache invalidation
- Subgraph summaries support scoped queries
Risks
- Memory overhead for cached residuals
- Consistency between cache and graph requires careful management
References
- ADR-014: Coherence Engine Architecture, Section 2