用知识图谱增强大模型,自动定位系统设计中的语义错误
Automated Semantic Fault Localization in SysML v2: A Human-in-the-Loop Framework Using Knowledge-Graph Augmented LLMs

- 结合领域知识图谱与微调小模型,生成符合工程约束的修复建议
- 在车辆系统测试中,语义错误修复率从不足3%提升至91%以上
- 适合需要高可靠性的系统建模工程师,辅助快速发现隐藏设计缺陷
SysML v2 的文本语法支持编译器对模型结构和语言规范性的验证,但无法检测违反领域规则却保持语法正确的语义错误。这类错误会贯穿设计流程,最终导致昂贵的集成失败。本文提出一种人机协同框架,通过微调的小语言模型(SLM)与编码系统元件间物理兼容性规则的知识图谱结合,实现错误自动识别与修复。知识图谱不仅用于生成包含合理领域违规的合成训练数据,还在推理时增强模型,确保修复建议符合工程约束。以车辆系统为例,知识图谱涵盖机械、电气、流体及信号接口关系。使用 Qwen2.5-Coder-1.5B 与 DeepSeek-Coder-6.7B 两个 SLM 微调后输出统一的 diff 补丁,精准定位故障并提供待工程师审核的修复方案。对 1,184 个测试样本的评估显示,微调使语义错误修复率从不足 3% 提升至超过 91%,且补丁式输出将令牌长度减少逾 60%。该框架为人工智能辅助模型验证提供了可行路径,可补充现有基于模型的系统工程工具。
原文摘要 · Abstract (English)
SysML v2's textual syntax enables compiler-based validation of model structure and language conformance. However, semantic mistakes that preserve syntactic validity but violate domain rules cannot be detected through compilers. These errors can propagate through the design process and surface late as costly integration failures. This paper presents a human-in-the-loop framework for identifying and repairing such errors automatically. It combines a fine-tuned Small Language Model (SLM) with a domain knowledge graph encoding physical compatibility rules between system elements. The knowledge graph also guides the generation of synthetic training data by systematically introducing plausible domain violations, and augments the model at inference time to ground repair suggestions in valid engineering constraints. We demonstrate the framework using the vehicle systems domain, where the knowledge graph captures the relationships between the mechanical, electrical, fluid, and signal interfaces. Two SLMs, Qwen2.5-Coder-1.5B and DeepSeek-Coder-6.7B, are fine-tuned to output unified diff patches that localize faults and present candidate repairs for engineer review, preserving human judgment in the design process. Evaluation of 1,184 test samples shows that fine-tuning improves semantic fault repair from less than 3% to more than 91%, with patch-based output reducing token length by over 60%. The framework offers a practical path toward AI-assisted model verification that complements existing MBSE tools.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。