arXiv:2512.10563cs.AI2025-12

用半形式化语言让AI决策过程可审计,每步只看明确输入。

NormCode: A Semi-Formal Language for Auditable AI Planning

  • 每步强制数据隔离,只接收显式传递的输入。
  • 在基础加法任务上实现100%准确率,自运行编译器验证可靠性。
  • 支持多格式查看与实时调试,适合监管、开发与领域专家使用。

随着AI进入法律推理、医疗诊断和金融决策等高风险领域,审计需求日益增长。当前基于大模型的工作流本质不透明:上下文污染导致模型幻觉并遗忘约束,隐式数据流使无法追溯每一步的真实输入。本文提出NormCode,一种半形式化语言,通过强制数据隔离确保每一步仅访问显式传递的输入,消除跨步骤干扰,使每个中间状态均可审查。语义操作(概率性语言模型推理)与句法操作(确定性数据流)严格分离,便于审计人员区分推理与机械重构。多格式生态系统包含NCDS、NCD、NCN和NCDN文件,满足开发者、领域专家与审计员的不同需求。四阶段编译管道将自然语言意图转换为可执行的JSON仓库,可视化画布应用提供实时图示与断点调试。通过在基础加法任务中实现100%准确率,并成功自托管编译器运行,验证了结构化中间表示能兼顾人类直觉与机器严谨性,同时保持完全透明。

原文摘要 · Abstract (English)

As AI systems move into high stakes domains such as legal reasoning, medical diagnosis, and financial decision making, regulators and practitioners increasingly demand auditability. Auditability means the ability to trace exactly what each step in a multi step workflow saw and did. Current large language model based workflows are fundamentally opaque. Context pollution, defined as the accumulation of information across reasoning steps, causes models to hallucinate and lose track of constraints. At the same time, implicit data flow makes it impossible to reconstruct what any given step actually received as input. We present NormCode, a semi formal language that makes AI workflows auditable by construction. Each inference step operates in enforced data isolation and can access only explicitly passed inputs. This eliminates cross step contamination and ensures that every intermediate state can be inspected. A strict separation between semantic operations, meaning probabilistic language model reasoning, and syntactic operations, meaning deterministic data flow, allows auditors to clearly distinguish inference from mechanical restructuring. The multi format ecosystem, consisting of NCDS, NCD, NCN, and NCDN files, allows developers, domain experts, and auditors to inspect the same plan in formats suited to their individual needs. A four phase compilation pipeline transforms natural language intent into executable JSON repositories. A visual Canvas application provides real time graph visualization and breakpoint debugging. We validate the approach by achieving full accuracy on base X addition and by self hosted execution of the NormCode compiler itself. These results demonstrate that structured intermediate representations can bridge human intuition and machine rigor while maintaining full transparency.

AI审计可解释性语言模型工作流

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。