Code-as-Auditor: Executable Compliance Reasoning via Regulation-to-Code
cs.SE, cs.AI
Submitted: 2026-09-16
Updated: 2026-09-16
Comments: 12 pages. Accepted at the 35th ACM International Conference on Information and Knowledge Management (CIKM '26), November 7-11, 2026, Rome, Italy
License: http://creativecommons.org/licenses/by/4.0/
The gist: Large Language Models (LLMs) are increasingly adopted for compliance and legal reasoning tasks, yet their outputs often lack explicit grounding in legal logic and evidence.
Terminology
Abstract
Large Language Models (LLMs) are increasingly adopted for compliance and legal reasoning tasks, yet their outputs often lack explicit grounding in legal logic and evidence. We present Code-as-Auditor, an LLM-based framework that extends the model's reasoning capability toward structured and evidence-grounded compliance assessment. The framework translates regulatory information into (1) formalized checklists and executable decision trees, encoding regulations and conditions as interpretable code structures. During inference, each checklist item is (2) dynamically expanded into factual and counterfactual questions, guiding the model to reason over case-specific evidence and potential violations. This process establishes a reasoning pipeline that proceeds from evidence identification, through rule application, to final decision-making, while a self-verification loop improves the logical consistency of the generated code and the traceability of outcomes. Experiments on privacy and data protection scenarios demonstrate that Code-as-Auditor delivers more accurate and evidence-backed evaluations, enabling automated compliance regulation checking grounded in explicit regulatory criteria.
Sources
- Program Synthesis with Large Language Models
- DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning
- DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence
- PolicyLR: A Logic Representation For Privacy Policies
- Toward Robust Legal Text Formalization into Defeasible Deontic Logic using LLMs
- Towards Robust Legal Reasoning: Harnessing Logical LLMs in Law
- AlphaEvolve: A coding agent for scientific and algorithmic discovery
- Qwen2.5 Technical Report
- Code Llama: Open Foundation Models for Code
- DISC-LawLLM: Fine-tuning Large Language Models for Intelligent Legal Services
- LegiLM: A Fine-Tuned Legal Language Model for Data Compliance
Related papers
- Falsification-Based Verification of LLM-Generated Optimization Models: Sound Test Batteries and Their Detection Limits
- GitSkills: A Dataset of Agent Skills on GitHub
- SABER: Benchmarking Operational Safety of LLM Coding Agents in Stateful Project Workspaces
- PackMonitor: Enabling Zero Package Hallucinations Through Decoding-Time Monitoring
- IntentCoding: Amplifying User Intent in Code Generation
- Incentives and Outcomes in Bug Bounties