AIRA:AI诱导风险审计:一种用于AI生成代码的结构化检查框架
AIRA: AI-Induced Risk Audit: A Structured Inspection Framework for AI-Generated Code
AI总结:
本文提出AIRA框架,用于检测AI生成代码中的失败不真实模式,通过三个研究验证AI生成代码在严重性上的显著差异,适用于治理和安全关键系统。
摘要:
从业者报告了AI辅助代码生成中存在方向性模式:AI生成的代码倾向于静默失败,保持功能外观的同时降低或隐藏保证。本文提出奖励形状失败假说,认为这种模式可能是通过人类反馈优化的产物而非随机bug分布。我们定义失败真实性为系统可观察输出准确反映其内部成功或失败状态的属性。随后提出AIRA(AI诱导风险审计),一种确定性的15项检查框架,用于检测代码中的失败不真实模式。我们报告了三项研究的结果:(1)匿名企业环境审计,(2)平衡的600文件公共语料库试点,(3)严格匹配对照复制,将955个AI归因文件与955个人类对照文件进行比较。在最终复制中,AI归因文件每文件显示0.435高严重性发现,而人类对照文件为0.242(1.80倍)。效果在JavaScript、Python和TypeScript中一致,以异常处理相关模式最强。这些发现与AI辅助代码中偏向失败软行为的方向性偏斜一致。AIRA适用于需要fail-closed行为的治理、合规和安全关键系统。
英文摘要:
Practitioners have reported a directional pattern in AI-assisted code generation: AI-generated code tends to fail quietly, preserving the appearance of functionality while degrading or concealing guarantees. This paper introduces the Reward-Shaped Failure Hypothesis - the proposal that this pattern may reflect an artifact of optimization through human feedback rather than a random distribution of bugs. We define failure truthfulness as the property that a system's observable outputs accurately represent its internal success or failure state. We then present AIRA (AI-Induced Risk Audit), a deterministic 15-check inspection framework designed to detect failure-untruthful patterns in code. We report results from three studies: (1) an anonymized enterprise environment audit, (2) a balanced 600-file public corpus pilot, and (3) a strict matched-control replication comparing 955 AI-attributed files against 955 human-control files. In the final replication, AI-attributed files show 0.435 high-severity findings per file versus 0.242 in human controls (1.80x). The effect is consistent across JavaScript, Python, and TypeScript, with strongest concentration in exception-handling-related patterns. These findings are consistent with a directional skew toward fail-soft behavior in AI-assisted code. AIRA is designed for governance, compliance, and safety-critical systems where fail-closed behavior is required.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。