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…
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 readAWS 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.
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.