Home / Blog / Story #10
Hybrid ML + LLM Julian Morrisette • 6 min read

Graph Math Meets Neural Scoring: Auditing 500,000+ Access Grants with Hybrid ML & LLMs

Graph Math Meets Neural Scoring: Auditing 500,000+ Access Grants with Hybrid ML & LLMs

When you are staring at half a million identity group memberships nested six layers deep, dumping a CSV into an LLM prompt isn't engineering—it's wishful thinking. Building my Autonomous UAR, NoPE & ML Peer-Divergence Engine taught me one of the most important lessons in modern AI development: use graph algorithms for structure, unsupervised ML for statistical outliers, and LLMs for human-legible explanation.

The Hidden Danger of Transitive Entitlements

In large enterprises, permissions are rarely granted directly to individuals; they flow through deeply nested group-in-group hierarchies. Worse, organic growth inevitably introduces circular group references that crash naive recursive scripts, alongside lingering standing privileges that violate Zero-Standing-Privilege (NoPE) principles.

To establish ground truth before any machine learning touched the data, I built a cycle-safe Breadth-First Search (BFS) graph crawler paired with my Groups Scanner microservice. It flattens multi-hop inheritance trees, tracks exact lineage paths (User → Team Group → Service Group → Prod Role), and flags standing human production entitlements that lack Just-In-Time (JIT) or Multi-Party Authorization (MPA) guardrails.

7-Attribute Information-Content + Neural Autoencoders

Once effective access is resolved, the real question becomes: which of these 500,000 grants doesn't belong? A role held by 95% of engineers under the same manager and cost center is routine; an entitlement held by a single person whose job family, org unit, and reporting chain share zero overlap with every other holder is a glaring least-privilege risk.

To quantify that intuition mathematically, I engineered a hybrid two-layer scoring engine:

  • 7-Attribute Information-Content (IC) Peer Similarity: Weights HR/organizational attributes by their Shannon self-information (-log P(x))—so sharing a small 6-person sub-team carries far stronger peer signal than sharing a 20,000-person country code.
  • Neural Autoencoder Divergence: Learns the compressed latent representation of normal identity-to-entitlement matrices and flags high reconstruction error grants—catching subtle multi-role toxic combinations that pairwise heuristics miss.

Closing the Last Mile with SmartExplain

Even the cleanest anomaly score fails if a compliance reviewer just sees Divergence = 0.94. That's where SmartExplain and LLM synthesis shine. By feeding the exact feature-attribution vector and transitive group path into a constrained explanation layer, every flagged grant receives a crisp, plain-English rationale—"Flagged High Risk: 0 of 14 peers under the same manager or job family hold this production entitlement, inherited transitively via a legacy migration group."

Graph math gives you completeness. Neural scoring gives you scale. Language models give you clarity. Put all three together, and 500,000 opaque rows turn into a surgical, high-signal security review.