Generating Structured BPMN Models from Smart Contracts Using LLMs
Abstract
The increasing complexity and widespread deployment of smart contracts (SCs) on blockchain platforms have heightened the need for interpretable and verifiable representations. While smart contracts encode critical business logic, their low-level implementations remain difficult for auditors and regulators to interpret. To bridge this semantic gap, we propose a structure-aware instruction-tuning framework that translates Solidity functions into Business Process Model and Notation (BPMN) diagrams using large language models (LLMs). Our approach constructs a high-quality dataset of 15K Solidity-BPMN pairs through embedding-based clustering, prompt engineering, and multi-template augmentation. We fine-tune DeepSeek-Coder using LoRA for efficient domain adaptation, enabling the model to generate syntactically valid and semantically faithful BPMN structures. Experimental results show that our fine-tuned model outperforms GPT-4o, Gemini, and baseline LLMs in both structural precision and semantic fidelity. This work lays the groundwork for structure-level explainability of smart contracts and supports future research in code-to-process modeling and blockchain compliance analysis.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.