TY - GEN
T1 - LPFGen
T2 - 8th International Conference on Blockchain Technology and Applications, ICBTA 2025
AU - Liu, Lixue
AU - Ke, Wei
AU - Chi, Haiyang
N1 - Publisher Copyright:
© The Author(s), under exclusive license to Springer Nature Switzerland AG 2026.
PY - 2026
Y1 - 2026
N2 - Smart contracts enable autonomous blockchain applications but remain difficult to implement securely and efficiently. We present LPFGen, a prompt–plus–fine-tuning framework for automated contract synthesis with large language models (LLMs). Our approach leverages Qwen3-8B with LoRA adapters, trained on a mixed corpus of 141,000 contract–prompt pairs and 6,003 masked-function repair samples, providing a reproducible and efficient PEFT recipe. Evaluation across 100 user-style specifications combines usability screening, compilation success, and static analysis, along with held-out repair and detection tasks. Results show that LPFGen raises the proportion of usable generations from 58.3% to 78.2%, while also improving detection and repair performance (F1 from 0.376 to 0.613; Accuracy from 0.696 to 0.787). These consistent gains indicate clear improvements in generation quality and reliability over untuned baselines. By integrating prompt design with targeted fine-tuning, LPFGen demonstrates that principled adaptation of LLMs can yield secure, verifiable, and practically deployable smart contracts. All code and experiment scripts are released to support reproducibility and further research.
AB - Smart contracts enable autonomous blockchain applications but remain difficult to implement securely and efficiently. We present LPFGen, a prompt–plus–fine-tuning framework for automated contract synthesis with large language models (LLMs). Our approach leverages Qwen3-8B with LoRA adapters, trained on a mixed corpus of 141,000 contract–prompt pairs and 6,003 masked-function repair samples, providing a reproducible and efficient PEFT recipe. Evaluation across 100 user-style specifications combines usability screening, compilation success, and static analysis, along with held-out repair and detection tasks. Results show that LPFGen raises the proportion of usable generations from 58.3% to 78.2%, while also improving detection and repair performance (F1 from 0.376 to 0.613; Accuracy from 0.696 to 0.787). These consistent gains indicate clear improvements in generation quality and reliability over untuned baselines. By integrating prompt design with targeted fine-tuning, LPFGen demonstrates that principled adaptation of LLMs can yield secure, verifiable, and practically deployable smart contracts. All code and experiment scripts are released to support reproducibility and further research.
KW - Fine-tuned
KW - Generation
KW - Large language model
KW - Smart contract
KW - Test cases
UR - https://www.scopus.com/pages/publications/105046090224
U2 - 10.1007/978-3-032-22088-2_30
DO - 10.1007/978-3-032-22088-2_30
M3 - Conference contribution
AN - SCOPUS:105046090224
SN - 9783032220875
T3 - Lecture Notes in Networks and Systems
SP - 409
EP - 418
BT - Blockchain Technology and Applications - Proceedings of 2025 8th International Conference on Blockchain Technology and Applications
A2 - Li, Ruidong
PB - Springer Science and Business Media Deutschland GmbH
Y2 - 12 December 2025 through 14 December 2025
ER -