# Toward Robust Legal Text Formalization into Defeasible Deontic Logic using LLMs

arXiv: https://arxiv.org/abs/2506.08899 · HTML: https://mlsanity.com/paper/2506.08899/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 32 references that are in the map.
- First posted on arXiv 10 Jun 2025.

## Builds on (most cited first, 7 of 7)

- [Language Models are Few-Shot Learners](https://mlsanity.com/paper/2005.14165/) (2020)
- [Finetuned Language Models Are Zero-Shot Learners](https://mlsanity.com/paper/2109.01652/) (2021)
- [The Curious Case of Neural Text Degeneration](https://mlsanity.com/paper/1904.09751/) (2019)
- [Towards Reproducible LLM Evaluation: Quantifying Uncertainty in LLM Benchmark Scores](https://mlsanity.com/paper/2410.03492/) (2024)
- [Optimizing Large Language Model Hyperparameters for Code Generation](https://mlsanity.com/paper/2408.10577/) (2024)
- [Layer-of-Thoughts Prompting (LoT): Leveraging LLM-Based Retrieval with Constraint Hierarchies](https://mlsanity.com/paper/2410.12153/) (2024)
- [Explainability by design: an experimental analysis of the legal coding process](https://mlsanity.com/paper/2505.01944/) (2025)

## Built on by (most cited first, 2 of 2)

- [Code-as-Auditor: Executable Compliance Reasoning via Regulation-to-Code](https://mlsanity.com/paper/2609.19199/) (2026)
- [De Jure: Iterative LLM Self-Refinement for Structured Extraction of Regulatory Rules](https://mlsanity.com/paper/2604.02276/) (2026)

## Abstract (arXiv)

We present a comprehensive approach to the automated formalization of legal texts using large language models (LLMs), targeting their transformation into Defeasible Deontic Logic (DDL). Our method employs a structured pipeline that segments complex normative language into atomic snippets, extracts deontic rules, and evaluates them for syntactic and semantic coherence. We introduce a refined success metric that more precisely captures the completeness of formalizations, and a novel two-stage pipeline with a dedicated refinement step to improve logical consistency and coverage. The evaluation procedure has been strengthened with stricter error assessment, and we provide comparative results across multiple LLM configurations, including newly released models and various prompting and fine-tuning strategies. Experiments on legal norms from the Australian Telecommunications Consumer Protections Code demonstrate that, when guided effectively, LLMs can produce formalizations that align closely with expert-crafted representations, underscoring their potential for scalable legal informatics.
