# SLGPT: Using Transfer Learning to Directly Generate Simulink Model Files and Find Bugs in the Simulink Toolchain

arXiv: https://arxiv.org/abs/2105.07465 · HTML: https://mlsanity.com/paper/2105.07465/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 5 of its 24 references that are in the map.
- First posted on arXiv 16 May 2021.

## Builds on (most cited first, 5 of 5)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [The Curious Case of Neural Text Degeneration](https://mlsanity.com/paper/1904.09751/) (2019)
- [Automated Source Code Generation and Auto-completion Using Deep Learning: Comparing and Discussing Current Language-Model-Related Approaches](https://mlsanity.com/paper/2009.07740/) (2020)
- [Deep Transfer Learning for Source Code Modeling](https://mlsanity.com/paper/1910.05493/) (2019)
- [DeepClone: Modeling Clones to Generate Code Predictions](https://mlsanity.com/paper/2007.11671/) (2020)

## Built on by (most cited first, 5 of 5)

- [SimuGen: Multi-modal Agentic Framework for Constructing Block Diagram-Based Simulation Models](https://mlsanity.com/paper/2506.15695/) (2025)
- [SimuAgent: An LLM-Based Simulink Modeling Assistant Enhanced with Reinforcement Learning](https://mlsanity.com/paper/2601.05187/) (2026)
- [Towards Automatic Support of Software Model Evolution with Large Language~Models](https://mlsanity.com/paper/2312.12404/) (2023)
- [LLM-based Framework for Generating and Verifying Parallel DEVS Statecharts](https://mlsanity.com/paper/2608.14956/) (2026)
- [SimuVerity: Benchmarking Agents for Engineering-Grade Simulink Model Generation](https://mlsanity.com/paper/2610.02304/) (2026)

## Abstract (arXiv)

Finding bugs in a commercial cyber-physical system (CPS) development tool such as Simulink is hard as its codebase contains millions of lines of code and complete formal language specifications are not available. While deep learning techniques promise to learn such language specifications from sample models, deep learning needs a large number of training data to work well. SLGPT addresses this problem by using transfer learning to leverage the powerful Generative Pre-trained Transformer 2 (GPT-2) model, which has been pre-trained on a large set of training data. SLGPT adapts GPT-2 to Simulink with both randomly generated models and models mined from open-source repositories. SLGPT produced Simulink models that are both more similar to open-source models than its closest competitor, DeepFuzzSL, and found a super-set of the Simulink development toolchain bugs found by DeepFuzzSL.
