Reproduce “XAI-LAW: A Logic Programming Tool for Modeling, Explaining, and Learning Legal Decisions” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Agostino Dovier, Talissa Dreossi, Andrea Formisano, Benedetta Strizzolo

Researchers at the University of Udine developed XAI-LAW, a logic programming tool that models articles of the Italian Criminal Code using Answer Set Programming, semi-automatically learns legal rules from judicial precedents, and offers explainable legal decisions. The system successfully managed vague legal concepts and contradictions, providing explanations via xclingo2 (averaging 0.078s for positive verdicts) and xASP (averaging 1.65s for visual graphs).

Key insights

  • Manual encoding of legal articles with expert consultation is effective for capturing precise semantic nuances that current Large Language Models (LLMs) struggle with.
  • Non-deterministic ASP choice rules offer a robust method for modeling vague legal concepts, generating multiple plausible interpretations that can be refined with new evidence.
  • A hybrid approach that combines formally codified immutable rules with learned rules from judicial decisions provides a balance between expressiveness, adaptability, and computational feasibility, while explicitly distinguishing their origin.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.