Graph Attention Engine
RGITech · Graph Attention Engine
Open source · Apache-2.0
Tech · Graph Attention Engine · open source

Graph Attention —
The Reasoning Engine That Takes Agents Off-Script

Scripted automation follows branches a human wrote. A fast decision layer picks among the options you wrote. GAE is the rung above both: the agent reasons — it decides as geometry and learns from verified outcomes — and with the ACCP Situation-Analyzer it forms the action from the situation, not from a bigger menu. The conservation gate is what makes that deployable instead of dangerous. Open, Apache-2.0, pip-installable today.

The autonomy maturity ladder: scripted automation, jev, GAE, GAE+ACCP — what each rung removes
The climb, and what each rung removes. A fast chooser (jev) stops at rung 2 — it never removes the script. GAE removes the guess (rung 3). GAE + ACCP removes the script — unscripted, and still gated (rung 4).

Runs beside, not instead. GAE doesn't orchestrate or prompt — run it underneath your agent framework as the reasoning and verified-outcome memory it doesn't have. What ships: reasoning and the gate. Roadmap: unscripted cross-copilot autonomy and causal wiring to your systems — flagged as such throughout. No production customers yet; CI figures are controlled experiments on synthetic streams.

It's real — watch it reason, and refuse

install → one decision → one refusal

The whole loop in one command: the engine scores a decision, learns from a verified outcome, and declines to learn from one it can't trust. That refusal is the gate — the thing that makes the top of the ladder deployable.

terminal · bundled example (representative output)
$ pip install graph-attention-engine
$ python examples/minimal_domain/run_example.py

decision #1    → ESCALATE     nearest prototype, d=0.21   gate GREEN
   verified correct (+1)   μ[escalate] ← μ + η·(v−μ)   # it learns
decision #438  # injected fault: a mis-verified outcome
   α·q·V = 0.071  <  θ_min = 0.118   → REJECTED, centroid unchanged
   # a learning engine declining to learn — the point

>>> from gae import compute_theta_min
>>> compute_theta_min(alpha, V)   # θ_min = 23.53/(α·V), the floor, in your code
The shape of the loop, not a screenshot — clone it to run it on your own stream.

What's in the box

  • shippedscore · update · gate — the named primitives
  • shippedper-context kernel K (L2 geometry)
  • shippedconservation gate α·q·V ≥ θ_min
  • shippedinspectable judgment state (centroid tensor)
  • shippedabstain / refuse untrusted updates
  • roadmapone-step rollback packaged into GAE
  • roadmapunscripted cross-copilot autonomy
  • roadmapcausal wiring to ERP / processes (reification)

Two roles: decide what, operationalize how

ACCP · GAE

The relationship under the whole ladder. Both layers reason — about different things — and the one that decides what to do is kept separate from the one that makes it real. That separation is why unscripted action is safe to run.

ACCP — decide what
The Situation-Analyzer reasons over the situation and forms the intent: what to do, here, now. The typed-intent bus only carries and routes it — it is not the menu. Situation → typed intent is in the SDK and wired into SOC and S2P; the full control plane is roadmap.
SDK/SOC/S2P + roadmap
GAE — operationalize how
Make the change real, safely: score it as geometry, clear the conservation gate, apply it, reify it into the systems. score / update / gate shipped; reification roadmap.
shipped

Rung 3 — it reasons

about the decision, and the situation

A fast layer picks among options you gave it and forgets the moment it answers. GAE reasons: an input becomes a factor vector, the action is the nearest centroid prototype under an L2 distance — a point you can put your finger on — and a verified outcome moves that geometry.

An invoice scored by L2 distance to the nearest centroid; the gate checks the action; verification moves the centroid
The action is the nearest prototype (L2 over dot-product: +36.89pp).

If that sounds like online k-means: k-means has no gate, no abstain, no record of which outcome moved which centroid, no rollback, and no transfer across domains. The classifier is the cheap part; the reasoning loop around it is the engine.

And it reasons about the situation before it scores. The Situation-Analyzer reads the context graph, classifies the situation, and forms the intent from it — which is the honest meaning of "unscripted": the action is generated from the situation, not selected from a human-enumerated list. It's what catches the access that's authorized and well-formed but wrong for this caller, right now — the case a signature-matcher waves through. A 4% price variance on copper in Q3 is not the same event as 4% on steel in Q1: a heuristic router returns the same output either way; situation analysis reads what it means in context. That graph-mediated enrichment lifts Day-1 accuracy +5.9pp before any learning — the graph's reasoning adds measurable value to the score. Situation → typed intent runs in the SDK and in the SOC and S2P copilots, on synthetic data.

Rung 4 — unscripted, and deployable: the gate

α·q·V ≥ θ_min

Rung 4 removes the script: the agent acts on an intent it formed, with no pre-written response per case. The reason that's a feature and not a liability is the conservation gate — every action must clear the same floor before it takes effect, or it escalates. Autonomy you can deploy, because it knows when to stop. It's also the honest line against "self-improving agents" that drift: here the thing that learns and the thing that decides are separate code, and every change clears the floor.

admit the action  iff  α · q · V ≥ θ_min  — else ESCALATE

This is the #438 REJECTED line, generalized. Be precise about what the number is: 9,826 gate evaluations / 0 violations is the gate math holding on a synthetic harness with injected faults — it shows the gate refuses updates that would degrade the surface, on harness-generated verification. The gate is only as strong as that verification signal q, which is exactly the open question below.

The evidence

measured, on synthetic streams
+3 → +21pp
Routing accuracy climbs across all five copilots — over 500 verified decisions each, 0 regressions; same base model, no retraining. The five-copilot panel is on the RGI overview.
Measured
9,826 / 0
Gate evaluations vs violations across five copilots — synthetic fault-injection harness; every update clears α·q·V ≥ θ_min or is refused (fail-closed).
Measured
ρ = 0.829
Cross-graph attention — transfer: a verified lesson in S2P speeds SOC convergence 1.5–2×, scaled by domain similarity — compounding a fast chooser can't produce.
Measured
n^2.150
Cross-graph attention — discovery: attending the enterprise's domain graphs to each other surfaces the risk nobody queried; the discovery surface grows super-quadratically as domains connect — 15 pairings across six.
Measured
zero labels vs 400
On held-out routing, GAE reaches a tuned Random Forest's operating point (68.5% vs 72.0%) with no training labels where the RF needed 400 — a different trade, not a tie-breaker.
MeasuredExternal

What the climb looks like

a fast decision layer vs RGI

jev (a System-1 decision API) is good at rung 2: a typed question, a probability back in milliseconds, stateless. Two of its own use cases, and what moving them up the ladder adds:

1 Tool-call guardrails score · gate — shipped situation — SDK/SOC
jevjev.yes_no("is this command safe?") → a fast probability on the model's own opinion, the same way every time.
RGIthe action is scored against verified-outcome prototypes; the gate can ESCALATE rather than guess; the boundary learns, and reads the situation — the authorized-but-shouldn't case — not the filename string.
2 Smart model routing RL-CTRL — measured, live in S2P
jevclassify a prompt's complexity → route to a cheap or premium model, by self-assessed difficulty — a static split.
RGIa learned effort-controller sets the investigation budget from verified outcomes, and the routing improves: +6.8pp at ~30% fewer reads (S2P). → RL-CTRL block.

Where it goes, and how to pull it

roadmap · Apache-2.0

Where it goes (roadmap): the full ACCP control plane — a control tower routing formed intents across many copilots on one audited plane; reification, so a change reaches your ERP processes, not just GAE's internals. The sibling blocks run on this engine: AgentEvolver (runtime config change, live in SOC), RL-CTRL · Judgment Memory (effort, and the versioned judgment it carries).

Pull it: engine first, on its own. Clone it, run the example, read the judgment state, and check the one thing that matters — after a thousand decisions, show the parameter that moved.

repo github.com/ArindamBanerji/graph-attention-engine paper Cross-Graph Attention (CGA) paper Judgment Memory