Generation of Optimized Solidity Code for Machine Learning Models using LLMs

In this paper, we propose LMST - an approach for Large Language Model (LLM) based conversion of the PyTorch code of an ML model into Solidity. Beyond mere correctness, we try to achieve gas cost optimization in the translation process, while taking into consideration the capabilities and limitations of the Ethereum Virtual Machine. We have also developed a proof of concept decentralized application 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.

Institutions

Publication Details

Published
2025-06-02
DOI
https://doi.org/10.1109/icbc64466.2025.11114660
Citations
1
Primary Topic
Advanced Statistical Methods and Models
Type
article
Field-Weighted Citation Impact
2.63
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Generation of Optimized Solidity Code for Machine Learning Models using LLMs

1 citations
Advanced Statistical Methods and Models
2.63
article

Generation of Optimized Solidity Code for Machine Learning Models using LLMs

article en
1 citations

Abstract

In this paper, we propose LMST - an approach for Large Language Model (LLM) based conversion of the PyTorch code of an ML model into Solidity. Beyond mere correctness, we try to achieve gas cost optimization in the translation process, while taking into consideration the capabilities and limitations of the Ethereum Virtual Machine. We have also developed a proof of concept decentralized application 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.

Indian Institute of Technology Kharagpur (IN)
Openalex Percentile: Top 7%
Advanced Statistical Methods and Models
2.63
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Generation of Optimized Solidity Code for Machine Learning Models using LLMs · (2025) | TGRS Research Map | TGRS