mlsanityData to 7 Oct 2026

Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justifications

arXiv 2403.16073 ↗First posted 24 Mar 2024cs.SEcited by 41

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

Smart contracts are decentralized applications built atop blockchains like Ethereum. Recent research has shown that large language models (LLMs) have potential in auditing smart contracts, but the state-of-the-art indicates that even GPT-4 can achieve only 30% precision (when both decision and justification are correct). This is likely because off-the-shelf LLMs were primarily pre-trained on a general text/code corpus and not fine-tuned on the specific domain of Solidity smart contract auditing. In this paper, we propose iAudit, a general framework that combines fine-tuning and LLM-based agents for intuitive smart contract auditing with justifications. Specifically, iAudit is inspired by the observation that expert human auditors first perceive what could be wrong and then perform a detailed analysis of the code to identify the cause. As such, iAudit employs a two-stage fine-tuning approach: it first tunes a Detector model to make decisions and then tunes a Reasoner model to generate causes of vulnerabilities. However, fine-tuning alone faces challenges in accurately identifying the optimal cause of a vulnerability. Therefore, we introduce two LLM-based agents, the Ranker and Critic, to iteratively select and debate the most suitable cause of vulnerability based on the output of the fine-tuned Reasoner model. To evaluate iAudit, we collected a balanced dataset with 1,734 positive and 1,810 negative samples to fine-tune iAudit. We then compared it with traditional fine-tuned models (CodeBERT, GraphCodeBERT, CodeT5, and UnixCoder) as well as prompt learning-based LLMs (GPT4, GPT-3.5, and CodeLlama-13b/34b). On a dataset of 263 real smart contract vulnerabilities, iAudit achieves an F1 score of 91.21% and an accuracy of 91.11%. The causes generated by iAudit achieved a consistency of about 38% compared to the ground truth causes.

Key facts. Cited by 41 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 51 of its 82 references that are in the map. First posted on arXiv 24 Mar 2024.

Builds on

51 of 82 references.

References · 51

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  5. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  8. 2020Scaling Laws for Neural Language Modelscited by 6,411
  9. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  10. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  11. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  12. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
38 more
  1. 2023Mistral 7Bcited by 3,065
  2. 2023A Survey of Large Language Modelscited by 2,537
  3. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  4. 2024Mixtral of Expertscited by 1,785
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2023A Survey on Evaluation of Large Language Modelscited by 1,227
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  8. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
  9. 2022A Survey on In-context Learningcited by 717
  10. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  11. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  12. 2023LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Modelscited by 317
  13. 2023Parameter-Efficient Fine-Tuning Methods for Pretrained Language Models: A Critical Review and Assessmentcited by 227
  14. 2023Fine-tuning Language Models for Factualitycited by 219
  15. 2024OpenMoE: An Early Effort on Open Mixture-of-Experts Language Modelscited by 185
  16. 2023Efficient Large Language Models: A Surveycited by 183
  17. 2023Full Parameter Fine-tuning for Large Language Models with Limited Resourcescited by 134
  18. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
  19. 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
  20. 2024RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculturecited by 80
  21. 2022Prompt Consistency for Zero-Shot Task Generalizationcited by 66
  22. 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
  23. 2018Securify: Practical Security Analysis of Smart Contractscited by 61
  24. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 57
  25. 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
  26. 2023ChatGPT for Vulnerability Detection, Classification, and Repair: How Far Are We?cited by 44
  27. 2023When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitationscited by 41
  28. 2022Transformer-Based Language Models for Software Vulnerability Detectioncited by 39
  29. 2019Manticore: A User-Friendly Symbolic Execution Framework for Binaries and Smart Contractscited by 36
  30. 2023Do you still need a manual smart contract audit?cited by 34
  31. 2021Smart Contract Vulnerability Detection: From Pure Neural Network to Interpretable Graph Feature and Expert Pattern Fusioncited by 24
  32. 2023Sparse is Enough in Fine-tuning Pre-trained Large Language Modelscited by 21
  33. 2018Vandal: A Scalable Security Analysis Framework for Smart Contractscited by 18
  34. 2023The Hitchhiker's Guide to Program Analysis: A Journey with Large Language Modelscited by 18
  35. 2024LLbezpeky: Leveraging Large Language Models for Vulnerability Detectioncited by 13
  36. 2023A Comprehensive Analysis of Adapter Efficiencycited by 8
  37. 2019Security Analysis Methods on Ethereum Smart Contract Vulnerabilities: A Surveycited by 7
  38. 2020DEFECTCHECKER: Automated Smart Contract Defect Detection by Analyzing EVM Bytecodecited by 4

50 most cited of 51 All 51 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 29; 2026: 8.

41 papers.

Sort:

By area:

  1. 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
  2. 2026Taming Various Privilege Escalation in LLM-Based Agent Systems: A Mandatory Access Control Frameworkcited by 50
  3. 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
  4. 2025Fraud-R1 : A Multi-Round Benchmark for Assessing the Robustness of LLM Against Augmented Fraud and Phishing Inducementscited by 31
  5. 2024Testing and Understanding Erroneous Planning in LLM Agents through Synthesized User Inputscited by 22
  6. 2025A Survey on Agentic Security: Applications, Threats and Defensescited by 17
  7. 2025Measuring and Augmenting Large Language Models for Solving Capture-the-Flag Challengescited by 14
  8. 2025Aitomia: Your Intelligent Assistant for AI-Driven Atomistic and Quantum Chemical Simulationscited by 8
  9. 2025VulAgent: Hypothesis-Validation based Multi-Agent Vulnerability Detectioncited by 8
  10. 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detectioncited by 7
  11. 2025Taxonomy, Evaluation and Exploitation of IPI-Centric LLM Agent Defense Frameworkscited by 7
  12. 2025MAVUL: Multi-Agent Vulnerability Detection via Contextual Reasoning and Interactive Refinementcited by 6
29 more
  1. 2025One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discoverycited by 6
  2. 2025Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilitiescited by 5
  3. 2024Efficacy of Various Large Language Models in Generating Smart Contractscited by 4
  4. 2025Detecting Various DeFi Price Manipulations with LLM Reasoningcited by 4
  5. 2025Prompt to Pwn: Automated Exploit Generation for Smart Contractscited by 4
  6. 2025SoK: Security and Privacy of AI Agents for Blockchaincited by 3
  7. 2025Designing LLM-based Multi-Agent Systems for Software Engineering Tasks: Quality Attributes, Design Patterns and Rationalecited by 3
  8. 2025SymGPT: Auditing Smart Contracts via Combining Symbolic Execution with Large Language Modelscited by 2
  9. 2025Adaptive Plan-Execute Framework for Smart Contract Security Auditingcited by 2
  10. 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detectioncited by 2
  11. 2025LISA Technical Report: An Agentic Framework for Smart Contract Auditingcited by 2
  12. 2024Connecting Large Language Models with Blockchain: Advancing the Evolution of Smart Contracts from Automation to Intelligencecited by 1
  13. 2025Experiences with Content Development and Assessment Design in the Era of GenAIcited by 1
  14. 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysiscited by 1
  15. 2025Web3 x AI Agents: Landscape, Integrations, and Foundational Challengescited by 1
  16. 2025Towards Secure and Explainable Smart Contract Generation with Security-Aware Group Relative Policy Optimizationcited by 1
  17. 2025Fine-tuning of Large Language Models for Domain-Specific Cybersecurity Knowledgecited by 1
  18. 2025TxSum: User-Centered Ethereum Transaction Understanding with Micro-Level Semantic Groundingcited by 1
  19. 2026An Effective and Cost-Efficient Agentic Framework for Ethereum Smart Contract Auditingcited by 1
  20. 2026Knowdit: Agentic Smart Contract Vulnerability Detection with Auditing Knowledge Summarizationcited by 1
  21. 2025Towards Understanding Deep Learning Model in Image Recognition via Coverage Testcited by 0
  22. 2025Rethinking and Exploring String-Based Malware Family Classification in the Era of LLMs and RAGcited by 0
  23. 2025On the Soundness and Consistency of LLM Agents for Executing Test Cases Written in Natural Languagecited by 0
  24. 2025AutoLogger: A Multi-Agent Framework for the End-to-End Automated Loggingcited by 0
  25. 2026Benchmarking Zero-Shot Reasoning Approaches for Error Detection in Solidity Smart Contractscited by 0
  26. 2026Decoupled Smart Contract Audits: Lightweight LLM Framework via Distillation and Aggregationcited by 0
  27. 2026Beyond Detection: Agentic Attack Synthesis and Simulation for Smart Contractscited by 0
  28. 2026Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language Modelscited by 0
  29. 2026Demystifying Agent Skills for Smart Contract Auditing: Design, Effectiveness, Behavioral Impactcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024LLM-SmartAudit: Advanced Smart Contract Vulnerability Detection
  2. 2025Large Language Model based Smart Contract Auditing with LLMBugScanner
  3. 2025SmartLLM: Smart Contract Auditing using Custom Generative AI
  4. 2025LLMs as verification oracles for Solidity
  5. 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generation
  6. 2025Securing Smart Contract Languages with a Unified Agentic Framework for Vulnerability Repair in Solidity and Move
  7. 2025LLM-BSCVM: An LLM-Based Blockchain Smart Contract Vulnerability Management Framework
  8. 2025Beyond Code Similarity: Benchmarking the Plausibility, Efficiency, and Complexity of LLM-Generated Smart Contracts