Get the daily emailDaily email
  1. Home
  2. Research
  3. This story

Semantic diffing of formal policies with anti-unification

AWS presents an open-source engine that uses anti-unification over an e-graph to compare two formal policies (for example SMT-LIB, Cedar, Dogwood, OpenShell policies or CEL), showing shared structure once and disagreements as Variants nodes. The main use is…

Published Read the original
Semantic diffing of formal policies with anti-unification

Why it matters

A practical way to validate LLM-generated security and access policies without trusting the LLM to do the comparison.

What happened

1 min read

AWS presents an open-source engine that uses anti-unification over an e-graph to compare two formal policies (for example SMT-LIB, Cedar, Dogwood, OpenShell policies or CEL), showing shared structure once and disagreements as Variants nodes. The main use is comparing several LLM translations of the same natural-language requirement into a formal policy so reviewers focus on the parts that vary.

inscraper analysis

Our analysis

It's a formal analogue of semantic entropy that shows the structure of disagreement rather than a single score. A key limitation is that domain equivalence rules must be written by hand, and the engine doesn't import native policies directly. Worth a look for teams generating authorization or agent-sandbox policies with LLMs.

More in Research