Using (Not-so) Large Language Models to Generate Simulation Models in a Formal DSL: A Study on Reaction Networks
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 1 paper in the map (data through 13 Oct 2026). Builds on 16 of its 57 references that are in the map. First posted on arXiv 3 Mar 2025.
Builds on
16 of 57 references.
References · 16
- 2017Attention Is All You Needcited by 60,106
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,231
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,221
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,360
- 2021Program Synthesis with Large Language Modelscited by 3,573
- 2023Large Language Models Empowered Agent-based Modeling and Simulation: A Survey and Perspectivescited by 255
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 188
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 66
- 2023Grammar Prompting for Domain-Specific Language Generation with Large Language Modelscited by 58
- 2023A Bibliometric Review of Large Language Models Research from 2017 to 2023cited by 57
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 55
4 more
- 2020Autonomous Discovery of Unknown Reaction Pathways from Data by Chemical Reaction Neural Networkcited by 27
- 2024Learning Agent-based Modeling with LLM Companions: Experiences of Novices and Experts Using ChatGPT & NetLogo Chatcited by 23
- 2023Context, Composition, Automation, and Communication -- The C2AC Roadmap for Modeling and Simulationcited by 4
- 2024Broadening Access to Simulations for End-Users via Large Language Models: Challenges and Opportunitiescited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.