weave-graph 0.2.21

Graph conflict detection and pattern matching for OSINT knowledge graphs
Documentation

weave-graph

Graph conflict-of-interest pattern detection for OSINT knowledge graphs.

Part of the Weave workspace.

Patterns

Six built-in conflict-of-interest patterns (COI-001 through COI-006) using three algorithms:

  • Cycle detection -- directed simple cycles matching edge-type sequences (e.g. payment-appointment kickbacks)
  • Path detection -- constrained DFS matching edge types and node labels (e.g. family appointments, payment influence chains)
  • Hub detection -- Person-Organization pairs with concentrated influence edges exceeding a threshold

All algorithms operate on in-memory subgraphs with O(1) adjacency lookups. Detection completes in <50ms for subgraphs up to 10K nodes / 50K edges.

Usage

use weave_graph::graph::{Subgraph, IndexedSubgraph};
use weave_graph::detect::{detect_conflicts, DetectOpts};

let subgraph = Subgraph { nodes: vec![/* ... */], edges: vec![/* ... */] };
let indexed = IndexedSubgraph::from_subgraph(&subgraph);
let results = detect_conflicts(&indexed, &DetectOpts::default());

License

MIT