RGI

Recursive Graph Improvement — the shift from systems that observe to systems that reason, learn from their own outcomes, and know when to stop.

Six problems nobody else has solved — with the experiments

Six Problems Nobody Else Has Solved

Each station closes a gap that the market treats as unsolvable. A skeptical architect needs the experiment, not the claim. The sixth — enrichment — is the mechanism that ties the other five together and sets up the data intelligence story.

① Without Situation Analyzer → no truly autonomous agents

Agentic frameworks dispatch work with heuristic routers. They decode — they don't reason about the situation. A 4% price variance on copper in Q3 is not the same event as 4% on steel in Q1.

Day-one accuracy: SA vs fixed-investigation baseline

Fixed baseline 72.3% With SA 78.2% (+5.9pp, p<0.0001) V-CGA-FROZEN experiment. AUC 0.81–0.88. ~844 parameters.

② Without TPF → process changes are manual art

Process mining shows WHERE. It cannot tell you WHY, fix it, or transfer the fix. Without reification, every bottleneck is a fresh 4–6 hour investigation.

Exception reduction — same bottleneck, with and without TPF

0 300 600 900 Q1 Q2 Q3 Q4 847 312 −63% With TPF (SA + JM + conservation) Manual — no learning

③ Without AgentEvolver for deployment → frozen production systems

You cannot change the engine on a flying airplane. Alibaba: AgentEvolver for static changes (offline). RGI's AgentEvolver: live deployments, conservation-gated.

  • Evolves AI systems and the targets of AI systems
  • DataOps pipeline configurations · ERP routing rules · procurement thresholds
  • Shadow-test → promote or reject → under conservation gate

AgentEvolver selectivity — the system is rigorous about what it promotes

Tested 7 variants Promoted 1 Rejected 6 (conservation, correctness floor, variance)

④ Graph math → judgment geometry matters

Knowledge graphs store facts. No graph system brings judgment geometry. The distance function isn't cosmetic — it determines whether the system can distinguish boundary decisions.

L2 vs dot product — boundary sensitivity over verified decisions

Dot product 41.3% L2 distance 78.2% +36.89pp — L2 preserves boundary sensitivity that cosine erases

⑤ Conservation → the system knows where it stops working

Every enterprise wants AI that improves. No enterprise will approve automation that changes its own logic without proof it hasn't degraded.

Per-threat detection — characterized envelope

Sustained degradation 100% Drift 100% Sudden regime break 100% Sparse targeted poisoning 57% — boundary named 9,826 checks across 5 copilots. <5% false-pause rate. The 57% boundary is a strength — we name where it stops.

⑥ Without enrichment → every decision starts with the same context

Traditional RSI improves the model's weights. RGI enriches the context — and that enrichment compounds. The 1,000th investigation traverses a richer graph than the 1st.

  • Source trust scores — update from verified outcomes, not configured rules
  • Combination discovery — CGA finds weather→logistics correlation from 200 verified decisions (nobody configured it)
  • Schema lineage — which upstream changes caused which downstream failures
  • Every verified outcome enriches the substrate the next decision reasons over

This is the mechanism behind data intelligence: data that learns about itself.

Cross-domain discovery scaling — enrichment compounds

0 50 100 150 Discoveries Domains connected 1 2 3 4 5 n2.15 linear Enrichment (super-quadratic) Linear (additive only)

The setup for data intelligence: once the context graph enriches itself from verified outcomes, the graph becomes a learning asset — not just a knowledge store. Source profilers update trust. Combination discoverers find new signals. Quality trajectories emerge. This is the substrate for data intelligence — data that gets smarter every day.

The machine — substrate, loops, and gate

GAE — Graph Attention Engine Context graph · Cross-graph attention · Judgment geometry substrate Apache-2.0 · pip install graph-attention-engine · v0.7.25 Situation Analyzer assembles cross-system context Q-routed investigation GraphStore Protocol 45 methods · 3 backends InMemory · SQLite · AGE Cross-Graph Attention enrichment · discovery · n²·¹⁵ finds what nobody queried Judgment Memory score → learn → compound ~844 params · O(1) · LVQ ④ Verify + Write Back RL-CTL (Reinforcement Learning Control) how many reads · which evidence when to stop · meta-learning controls learning, not decisions AgentEvolver shadow-test · promote · reject live deployments, not static ⑤ Evolve ⑥ Tech-Process Fusion — processes become editable graph objects Celonis (WHERE) + SAP (WHAT) + EDW (SCHEMA) → causal connectivity → reasoned decisions Conservation Gate — ⑧ Govern θ_min per-deployment · 3-layer · autonomy cannot outrun accuracy · all fixed at deployment approval ⑨ Each turn leaves the system better than before
class CompoundingScorer:
    """Station ④: score → verify → reshape centroids.
    ~844 parameters. No LLM. No GPU. O(1) per decision."""

    def score(self, factors: List[float], category: str) -> ScoreResult:
        """Softmax over L2 distances to category centroids."""
        v = np.array(factors)
        μ = self._graph_store.get_centroids(category)
        d_sq = {a: np.sum((v - μ[category][a]) ** 2) for a in self._actions}
        logits = {a: -d_sq[a] / self._tau for a in self._actions}  # τ = 0.1
        max_l = max(logits.values())
        exp_l = {a: np.exp(logits[a] - max_l) for a in self._actions}
        Z = sum(exp_l.values())
        probs = {a: exp_l[a] / Z for a in self._actions}
        best = max(probs, key=probs.get)
        return ScoreResult(action=best, confidence=probs[best],
                           basis=self._graph_store.get_similar(v, category, limit=3))

    def learn(self, factors, action_index, category, confirmed):
        """LVQ centroid update — conservation-gated."""
        η = 0.05 if confirmed else 0.01
        v = np.array(factors)
        centroids = self._graph_store.get_centroids()  # all categories
        μ_old = centroids[category][action_index]
        μ_new = μ_old + η * (v - μ_old)
        # μ₀ = μ_canonical + ε_firm; update is LVQ: μ ← μ + η(v - μ)
        new_centroids = centroids.copy()
        new_centroids[category][action_index] = μ_new
        gate = self._conservation_gate.check(centroids, new_centroids, category)
        if not gate.passed:
            return LearnResult(accepted=False, reason=gate.reason)
        centroids[category][action_index] = μ_new
        self._graph_store.save_centroids(centroids)
        return LearnResult(accepted=True, displacement=gate.displacement)
class SituationAnalyzer:
    """Station ②: assemble cross-system context → factor vector.
    Q-routed investigation — decides WHICH evidence and WHEN to stop."""

    async def assemble(self, entity_id: str) -> SituationContext:
        graph_ctx = await self._graph_store.get_context(entity_id)
        erp_ctx = await self._sap_connector.get_entity(entity_id)
        process_ctx = await self._celonis_connector.get_activities(entity_id)
        ctx = SituationContext(graph=graph_ctx, erp=erp_ctx, process=process_ctx)
        ctx.factors = self._extract_factors(ctx)
        ctx.category = self._classify(ctx.factors)
        return ctx

    def select_investigation(self, v, category) -> List[str]:
        """Q-routed: precision × leverage × discriminative.
        System reads the most informative evidence first."""
        q_values = {
            j: self._precision(j,v,category) * self._leverage(j,v,category)
               * self._discriminative(j,v,category)
            for j in self._available_factors
        }
        # Sorted by Q — top factors read first, stop when marginal Q drops
        return sorted(q_values, key=q_values.get, reverse=True)
class ConservationGate:
    """Station ⑧: three layers, all fixed at deployment approval.
    Learning cannot alter them. The gate protects the geometry."""

    def check(self, old_centroids, new_centroids, category) -> GateResult:
        α = self._current_phase()
        V = self.tensor_volume  # d × c × a

        # Layer 1: sufficient verified volume (α·q·V must exceed θ_min)
        if α * self._q * V < self.θ_min:
            return GateResult(passed=False, reason="insufficient_volume")

        # Displacement ceiling: centroid shift must stay within bounds
        disp = np.linalg.norm(new_centroids[category] - old_centroids[category])
        max_disp = 23.53 / (α * V)
        if disp > max_disp:
            return GateResult(passed=False, reason="displacement_exceeded")

        # Layer 2: per-factor displacement (no single factor drifts too far)
        for j in range(len(new_centroids[category])):
            δ_j = abs(new_centroids[category][j] - old_centroids[category][j])
            if δ_j > 0.7 * disp:  # m_rel = 0.7×
                return GateResult(passed=False, reason=f"per_factor_{j}")

        # Layer 3: rate of change (sudden shifts trigger pause)
        rate_short = self._rate(window=20)
        rate_long = self._rate(window=self._q)
        if rate_short > 1.15 * rate_long:  # short-window 15% above long = regime shift
            return GateResult(passed=False, reason="rate_of_change")

        return GateResult(passed=True, displacement=disp)

    # Per-deployment floors (not global):
    # SOC: 0.764 (20:1)  DataOps: 0.669 (10:1)  S2P: 0.769 (5:1)
    # Purchasing: 0.655 (3:1)  Trading: 0.766 (2:1)
class GraphStore(Protocol):
    """45-method protocol. THE storage abstraction.
    3 backends: InMemory (test), SQLite (dev), AGE (prod).
    258 dedicated tests. Zero DecisionStore imports."""

    # Decision lifecycle
    def save_decision(self, decision: Decision) -> str: ...
    def save_outcome(self, decision_id: str, outcome: Outcome) -> None: ...
    def get_decisions(self, category: str, limit: int) -> List[Decision]: ...

    # Centroid geometry (judgment memory)
    def save_centroids(self, category: str, centroids: np.ndarray) -> None: ...
    def get_centroids(self, category: str) -> Optional[np.ndarray]: ...

    # Cross-graph attention (discovery)
    def get_context(self, entity_id: str) -> GraphContext: ...
    def traverse(self, start: str, edge_types: List[str],
                 max_depth: int = 3) -> List[Path]: ...

    # Evolution (AgentEvolver)
    def save_evolution(self, domain: str, key: str, payload: dict) -> None: ...
    def get_evolution_log(self, domain: str) -> List[EvolutionEntry]: ...

Proof it compounds

RGI vs traditional RSI:

  • RSI improves the model. RGI enriches the context before scoring
  • Every verified decision adds to the graph → next investigation traverses richer substrate
  • Moat equation: I(n,t) ~ O(n2.150 × t1.387)
  • Super-quadratic in domains (enrichment across graphs) · super-linear in time (compounding)
  • μ₀ = μ_canonical + ε_firm (ε_firm ≈ 0.15–0.40) — the geometry is the firm's own

Accuracy over 1,000 verified decisions — learning vs frozen

60% 70% 80% 90% Verified decisions 0 500 1000 71.7% 78.9% +7.2pp Learning (centroids reshape) Frozen (day-zero geometry)

The moat — advantage does not transfer

SOC 19.6 ± 5.4 pp DataOps 5.7 ± 1.1 pp Competitor: identical engine, different firm's decision stream. 0 of 5 seeds reached parity. The judgment is the firm's own.

Ablation — which features matter

All features 0.814 − trajectory 0.642 ← below baseline − geometric 0.814 Trajectory features are necessary and nearly sufficient.
Compounding gain
+21.96pp
Aggregate, 40 deployments
Super-linear rate
t1.387
95% CI [1.308, 1.477]
Cross-domain
n2.15
Discovery scales super-quad
Moat gap (SOC)
19.6pp
0/5 seeds at parity
Compounding Dividend Three Properties

The equation card — five operations, one specification

RGI Equation Card

Five operations — Score, Investigate, Learn, Conserve, Compound — map one-to-one to the stations on the loop. This is the complete mathematical specification. Each equation has a corresponding evidence tier (the full technical paper): architectural, validated, or proven+confirmed.

Real decisions, real conservation floors

Per-deployment conservation floor — one law, five calibrations

0.60 0.70 0.80 0.655 Purchasing (3:1) 0.669 DataOps (10:1) 0.764 SOC (20:1) 0.766 Trading (2:1) 0.769 S2P (5:1)
DataOps
"The Rule That Proved Itself Wrong"
  • Hard problem: AgentEvolver self-demotion
  • Self-computation across nine data systems — data intelligence that compounds
  • Auto-approve rule for schema-change alerts — promoted 6 months ago
  • New pipeline added → rule accuracy drops 89%→71%
  • AgentEvolver detects regression → demotes to shadow-test
  • 7 tested, 1 promoted, 6 rejected. The system corrects itself.
Security Operations
"The Analyst Who Gave Notice"
  • Hard problem: knowledge preservation
  • Senior analyst leaves — 12 years of pattern recognition walks out
  • Without judgment memory: next analyst starts at zero
  • With it: verified decisions encoded in centroid geometry
  • Replacement's first day = predecessor's last day accuracy
  • The centroid geometry stays. Same mechanism demonstrated on S2P: +7.2pp.
Trading
"Code Is Free, Judgment Isn't"
  • Hard problem: non-transferable moat
  • Volatility scoring — thesis quality, behavioral patterns, position timing
  • Open-source the engine (Apache-2.0) — anyone can run it
  • Competitor runs identical code on their own decision stream
  • After 1,000 decisions: SOC experiment showed 19.6pp gap, 0/5 seeds at parity
  • The code is free. The geometry is the firm's moat.
Source-to-Pay
"The Rule That Kept Saying — No"
  • Hard problem: conservation gate in production
  • Procurement invoice scoring — auto-approve, hold, or escalate
  • System proposes auto-approving commodity invoices under $50K
  • Gate blocks — displacement exceeds θ_min (5:1 penalty ratio)
  • Three weeks + 200 verified decisions later → re-proposes → gate passes
  • Autonomy earned, not assumed

The tradeoff is real: conservation-constrained accuracy is 6.5–11.1pp worse than unconstrained. That's the price. The return: 86.7% degradation detection at 0.87% false-pause. A global floor of 0.75 would pause 48% of healthy Purchasing decisions. Per-deployment calibration makes a system people actually use.

From observation to reasoning — what RGI changes

Domain unlocks — what becomes possible

Knowledge preservation

Departed expert's judgment → inspectable geometry. Centroids, not tribal knowledge.

Truly autonomous agents

Situational reasoning, not heuristic routing. Q-routed investigation. +5.9pp day-one.

Self-adjusting deployments

Evolve while running. Shadow-test → promote/reject. AI systems + their targets. Conservation-gated.

Data intelligence

Data learns about itself. Source trust · quality trajectories · combination discovery. n2.15 across domains.

Causal connectivity

Processes → editable graph objects. Celonis + SAP + EDW through reasoning, not dashboards. 847→312 (−63%).

Earned autonomy

Earns auto-decide rights · pulls back when accuracy drops · names where it stops. Queues shrink.

Technology unlocks — what the architecture enables

Open-source substrate
GAE
PyPI · Apache-2.0 · v0.7.25
Reasoning without LLM
~844
Parameters · O(1) · No GPU
Cross-domain transfer
n2.15
Super-quadratic discovery

Why the field hasn't built this

LLM judges cannot evaluate centroid-quality reasoning

Surface features 86% Geometry-derived ~12% 240 judgment pairs. LLMs agree on surface — they cannot evaluate centroid-quality reasoning.

Market signal: the substrate is commoditizing.

  • GraphRAG — published recipe. Retrieves, doesn't reshape.
  • LangGraph / CrewAI — route work. Don't learn from outcomes.
  • Palantir / SAP — world memory without decision geometry.
  • Celonis — observes processes. Doesn't reason about them.
  • Funded startups — tackle individual slices.

None creates bounded recursive self-improvement with learned reasoning across enterprise decision domains.

Test cases
15,052
Across 6 repos
Copilots
5
One architecture
Verified decisions
9,826
Verified decisions
Compounding rate
t1.387
Super-linear · accelerating