The Hallway Track
Engineering Insights

Semantic diffing of formal policies with anti-unification

AWS Machine Learning Blog · Nov 11, 2026 · Engineering Insights

Anti-unification enables semantic diffing of LLM-generated formal policies to surface meaningful disagreements

“A semantic diff shows what two policies have in common and where they disagree.”

AWS describes using anti-unification to semantically diff formal policies, solving the problem that LLMs generating formal artifacts from natural language prose may produce multiple syntactically different but potentially behaviorally divergent outputs. The technique finds the most specific common pattern between two policy expressions, letting reviewers focus on parts that vary across model runs rather than syntactic noise. This is directly relevant to teams building agentic AI systems that use LLMs to translate requirements into authorization policies like Cedar or OpenShell sandbox rules.

autoformalization policy-as-code formal-verification LLMs agent-sandboxing AWS

Watch / read the original source →