基于LLM的软件工程助手不仅因产生错误输出而失败,还可能错误地分配信任给不一致的软件构件。现有评估主要关注下游结果,无法揭示模型是否识别了退化的证据、识别了不可靠的来源或校准了对构件的信任。我们提出了TRACE(Trust Reasoning over Artifacts for Calibrated Evaluation)框架,该框架在盲扰动下提取结构化的构件级信任轨迹,涵盖Javadoc、方法签名、实现和测试前缀。使用22,339个有效轨迹,从七个模型在456个精心挑选的Java方法包中评估了每个构件的质量评估、不一致检测、受影响构件归因和来源优先级。所有模型中,质量惩罚主要集中在受扰动的构件上,并随严重程度增加,但敏感性在构件类型上不对称:文档错误导致的重到细微差距远大于实现错误(0.152-0.253 vs. 0.049-0.123)。模型在检测显性文档错误方面表现良好(67-94%),并在检测Javadoc和实现矛盾时达到50-91%,但当只有实现漂移而文档仍合理时,检测率下降7-42个百分点。六个模型的置信度校准不佳。这些发现表明,当前LLM在审计自然语言规范方面优于检测细微代码级漂移,因此在正确性关键的下游应用前需进行显式的构件级信任推理。
英文摘要:
LLM-based software engineering assistants often reason over multiple artifacts, including code, documentation, signatures, and tests, even when those artifacts are incomplete or mutually inconsistent. Existing evaluations primarily measure final outputs, leaving unclear whether a model recognized unreliable evidence, identified the faulty source, or prioritized the appropriate artifact.
We introduce TRACE, a controlled method for evaluating how LLMs assess and prioritize conflicting software artifacts. TRACE constructs paired clean and perturbed versions of real-world Java method bundles by injecting known faults into the documentation, implementation, or both while holding the remaining artifacts fixed. Models then assess artifact quality, detect and localize inconsistencies, and rank the available sources by reliability. Using 22,339 valid responses from seven LLMs on 456 method bundles, we find that quality penalties are generally localized to the perturbed artifact and increase with fault severity. However, models exhibit a consistent source-origin asymmetry: they detect documentation faults at 67-94% and explicit documentation-implementation contradictions at 50-91%, but detection falls by 21-43 percentage points when only the implementation changes while documentation remains intact. Models also struggle to deprioritize faulty implementations, and confidence provides little separation between correct and incorrect judgments for six of seven models. These results show that current LLMs are not symmetric integrators of software evidence: they audit natural-language specifications more reliably than subtle implementation behavior. TRACE provides a controlled method for exposing this failure mode before LLMs are used in correctness-critical software engineering workflows.
Trust at Your Own Peril: A Mixed Methods Exploration of the Ability of Large Language Models to Generate Expert-Like Systems Engineering Artifacts and a Characterization of Failure Modes
Virginia Tech(弗吉尼亚理工大学);Scale AI(Scale AI公司);Virginia Tech National Security Institute(弗吉尼亚理工大学国家安全研究所)
AI Trust OS -- A Continuous Governance Framework for Autonomous AI Observability and Zero-Trust Compliance in Enterprise Environments
Old Dominion University(欧道明大学);AI Motion Labs(AI Motion实验室);Florida International University(佛罗里达国际大学);Nanyang Technological University(南洋理工大学);University of Colombo(科伦坡大学);Accenture Technology Labs(埃森哲技术实验室)