使用(并非那么)大型语言模型在形式化DSL中生成仿真模型:反应网络研究
Using (Not-so) Large Language Models to Generate Simulation Models in a Formal DSL: A Study on Reaction Networks
AI总结:
本研究通过微调7B参数的Mistral模型,将自然语言转化为反应网络仿真模型,在84.5%案例中恢复真实模型,提供高效自托管替代方案。
摘要:
形式化语言是建模与仿真的重要组成部分。它们能够将知识提炼为简洁的仿真模型,便于自动执行、解释和分析。然而,人类最易于表达模型的方式可以说是自然语言,而自然语言不易被计算机解释。在此,我们评估了大型语言模型(LLM)如何用于将自然语言形式化为仿真模型。现有研究仅探索了使用非常大的LLM,如商业GPT模型,且未微调模型权重。为弥补这一空白,我们展示了如何对具有开放权重、7B参数的Mistral模型进行微调,以将自然语言描述翻译为领域特定语言中的反应网络模型,提供了一种可自托管、计算高效且内存高效的替代方案。为此,我们开发了一个合成数据生成器,作为微调和评估的基础。我们的定量评估表明,微调后的Mistral模型在多达84.5%的情况下能够恢复真实仿真模型。此外,我们的小规模用户研究展示了该模型在一次性生成以及各领域交互式建模方面的实际潜力。尽管前景可观,但目前形式下,微调后的小型LLM无法赶上大型LLM。我们得出结论,需要更高质量的训练数据,并期望未来小型开源LLM提供新的机遇。
英文摘要:
Formal languages are an integral part of modeling and simulation. They allow the distillation of knowledge into concise simulation models amenable to automatic execution, interpretation, and analysis. However, the arguably most humanly accessible means of expressing models is through natural language, which is not easily interpretable by computers. Here, we evaluate how a Large Language Model (LLM) might be used for formalizing natural language into simulation models. Existing studies only explored using very large LLMs, like the commercial GPT models, without fine-tuning model weights. To close this gap, we show how an open-weights, 7B-parameter Mistral model can be fine-tuned to translate natural language descriptions to reaction network models in a domain-specific language, offering a self-hostable, compute-efficient, and memory efficient alternative. To this end, we develop a synthetic data generator to serve as the basis for fine-tuning and evaluation. Our quantitative evaluation shows that our fine-tuned Mistral model can recover the ground truth simulation model in up to 84.5% of cases. In addition, our small-scale user study demonstrates the model's practical potential for one-time generation as well as interactive modeling in various domains. While promising, in its current form, the fine-tuned small LLM cannot catch up with large LLMs. We conclude that higher-quality training data are required, and expect future small and open-source LLMs to offer new opportunities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。