arXiv:2508.06017cs.SEcs.CL2025-08

让编程AI不仅写代码,还要说清理由,提升可信度。

Position: Intelligent Coding Systems Should Write Programs with Justifications

  • 用符号约束+神经表示的混合方法生成可解释理由
  • 强调理由需与用户认知一致且语义准确
  • 适合关注AI可信度的开发者和非专家用户

智能编程系统正通过自然语言描述行为改变软件开发方式。然而,基于AI的编码器决策过程不透明,引发信任与可用性问题,尤其对无法审查底层实现的非专家用户而言。本文认为,这些系统不仅要生成代码,还需提供清晰、一致的解释,弥合模型推理与用户理解之间的鸿沟。为此,我们提出两个关键解释属性:认知对齐与语义忠实,并指出现有方法(如形式验证、静态分析、事后可解释性)的局限性。我们主张探索神经符号方法用于解释生成,即在训练中用符号约束引导模型行为,通过神经表示增强程序语义,实现在推理时自动进行一致性检查。

原文摘要 · Abstract (English)

Intelligent coding systems are transforming software development by enabling users to specify code behavior in natural language. However, the opaque decision-making of AI-driven coders raises trust and usability concerns, particularly for non-expert users who cannot inspect low-level implementations. We argue that these systems should not only generate code but also produce clear, consistent justifications that bridge model reasoning and user understanding. To this end, we identify two critical justification properties-cognitive alignment and semantic faithfulness-and highlight the limitations of existing methods, including formal verification, static analysis, and post-hoc explainability. We advocate exploring neuro-symbolic approaches for justification generation, where symbolic constraints guide model behavior during training and program semantics are enriched through neural representations, enabling automated consistency checks at inference time.

AI编程可解释性神经符号

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