用大模型+强化学习打造可本地部署的Simulink建模助手,提升设计效率与准确性。
SimuAgent: An LLM-Based Simulink Modeling Assistant Enhanced with Reinforcement Learning
- 将Simulink模型转为轻量字典式Python表示,降低计算开销
- 通过两阶段训练和自反思强化学习,实现复杂建模任务的高效求解
- 支持私有化部署,适合工业级建模需求,不依赖云端
大型语言模型(LLMs)在文本代码自动化方面已取得突破,但在面向图结构的工程工作流中仍潜力未被充分挖掘。本文提出SimuAgent,一个面向Simulink的基于LLM的建模与仿真代理。SimuAgent将冗长的XML表示替换为简洁的字典式Python形式,显著减少令牌数量,提升可读性,并支持快速、在进程内仿真。采用轻量级“规划-执行”架构,分两阶段训练,赋予代理底层工具操作能力与高层设计推理能力。针对长时程任务奖励稀疏问题,提出反射增强的组相对策略优化(ReGRPO),引入自我反思轨迹提供丰富中间反馈,加速收敛并提升鲁棒性。在新发布的包含5300个跨领域建模任务的SimuBench基准上测试,经微调的Qwen2.5-7B模型在少样本提示下表现优于标准强化学习基线,甚至超越GPT-4o。消融实验表明,两阶段课程训练和抽象重建数据增强进一步提升泛化能力。SimuAgent可在本地环境训练与运行,仅需适度硬件资源,为工业级模型驱动工程提供隐私保护、成本可控的AI辅助解决方案。
原文摘要 · Abstract (English)
Large language models (LLMs) have revolutionized text-based code automation, but their potential in graph-oriented engineering workflows remains under-explored. We introduce SimuAgent, an LLM-powered modeling and simulation agent tailored for Simulink. SimuAgent replaces verbose XML with a concise, dictionary-style Python representation, dramatically cutting token counts, improving interpretability, and enabling fast, in-process simulation. A lightweight plan-execute architecture, trained in two stages, equips the agent with both low-level tool skills and high-level design reasoning. To tackle sparse rewards in long-horizon tasks, we propose Reflection-GRPO (ReGRPO), which augments Group Relative Policy Optimization (GRPO) with self-reflection traces that supply rich intermediate feedback, accelerating convergence and boosting robustness. Experiments on SimuBench, our newly released benchmark comprising 5300 multi-domain modeling tasks, show that a Qwen2.5-7B model fine-tuned with SimuAgent converges faster and achieves higher modeling accuracy than standard RL baselines, and even surpasses GPT-4o when evaluated with few-shot prompting on the same benchmark. Ablations confirm that the two-stage curriculum and abstract-reconstruct data augmentation further enhance generalization. SimuAgent trains and runs entirely on-premise with modest hardware, delivering a privacy-preserving, cost-effective solution for industrial model-driven engineering. SimuAgent bridges the gap between LLMs and graphical modeling environments, offering a practical solution for AI-assisted engineering design in industrial settings.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。