Generation of Optimized Solidity Code for Machine Learning Models using LLMs
Not on the map. Why?
Abstract (arXiv)
While a plethora of machine learning (ML) models are currently available, along with their implementation on disparate platforms, there is hardly any verifiable ML code which can be executed on public blockchains. We propose a novel approach named LMST that enables conversion of the inferencing path of an ML model as well as its weights trained off-chain into Solidity code using Large Language Models (LLMs). Extensive prompt engineering is done to achieve gas cost optimization beyond mere correctness of the produced code, while taking into consideration the capabilities and limitations of the Ethereum Virtual Machine. We have also developed a proof of concept decentralized application using the code so generated for verifying the accuracy claims of the underlying ML model. An extensive set of experiments demonstrate the feasibility of deploying ML models on blockchains through automated code translation using LLMs.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 5 of its 25 references that are in the map. First posted on arXiv 8 Mar 2025.
Builds on
5 of 25 references.
References · 5
- 2019Decentralized & Collaborative AI on Blockchaincited by 21
- 2018Trustless Machine Learning Contracts; Evaluating and Exchanging Machine Learning Models on the Ethereum Blockchaincited by 8
- 2020Analysis of Models for Decentralized and Collaborative AI on Blockchaincited by 6
- 2023Leveraging Machine Learning for Multichain DeFi Fraud Detectioncited by 3
- 2024ML2SC: Deploying Machine Learning Models as Smart Contracts on the Blockchaincited by 2
Built on by
Citing papers per year: 2025: 1.
1 paper.