跳到正文
arXiv (AI + Vision + Imaging)· S M Zia Ur Rashid, Sazidul Islam Hira, Suman Rath·· 4 小时前AI 评分15

Proteus-OT:静态审计LLM生成PLC代码中的厂商—协议不匹配

Real Package, Wrong Controller: Static Auditing of Vendor--Protocol Mismatches in LLM-Generated PLC Code

AI 导读

研究提出Proteus-OT,一种基于版本固定文档绑定图的无标签静态验证器,用于检测LLM生成PLC代码中导入级厂商—协议不兼容。在883个生成脚本中,180个(20.4%)存在与声明目标的导入级不匹配;限定单一厂商目标时为16.3%,再要求涉事库触达协议通信调用时为14.2%。96.6%的不匹配脚本所导入的包和方法均真实存在,说明仅检查存在性的基线无法识别此类问题。

正文 · 原文

arXiv:2611.33227v1 Announce Type: cross Abstract: Language models can generate Python that drives industrial protocols on programmable logic controllers, yet existing code-grounding checks ask whether an imported package or symbol exists rather than whether it suits the declared industrial target. We define \emph{metadata-conditioned, import-level vendor--protocol incompatibility} and build \textsc{Proteus-OT}, a label-free static verifier over a version-pinned graph of documented bindings. Across 883 generated scripts, 180 carry an import-level mismatch against the declared target (20.4\%); restricting to single-vendor targets gives 16.3\%, and additionally requiring the offending library to reach a protocol communication call gives 14.2\%, which we read as conditional on the corpus metadata rather than on verified intent. None of the 28 adjudicable human control files carries one, a sample too small to estimate a prevalence. Within the balanced subset, 96.6\% of mismatching scripts import packages and call methods that exist, so an existence baseline does not represent them, and every positive ships with an inspectable witness. We also audit machine-versus-human classification on the same corpus, where character $n$-grams reach macro-F1 1.000 under task, model and vendor-disjoint partitions and survive comment removal, an AST round trip and identifier anonymisation. The trailing newline present in 95.2\% of human files and in none of the generated ones separates the classes on its own. Vendor--protocol consistency is a useful static audit target, whereas provenance classification on repository-labelled corpora is not authorship detection.

来源:arXiv (AI + Vision + Imaging) · arxiv.org