SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detection
On the map: Mixture-of-experts → Expert routing strategies
Abstract (arXiv)
With the increasing security issues in blockchain, smart contract vulnerability detection has become a research focus. Existing vulnerability detection methods have their limitations: 1) Static analysis methods struggle with complex scenarios. 2) Methods based on specialized pre-trained models perform well on specific datasets but have limited generalization capabilities. In contrast, general-purpose Large Language Models (LLMs) demonstrate impressive ability in adapting to new vulnerability patterns. However, they often underperform on specific vulnerability types compared to methods based on specialized pre-trained models. We also observe that explanations generated by general-purpose LLMs can provide fine-grained code understanding information, contributing to improved detection performance. Inspired by these observations, we propose SAEL, an LLM-based framework for smart contract vulnerability detection. We first design targeted prompts to guide LLMs in identifying vulnerabilities and generating explanations, which serve as prediction features. Next, we apply prompt-tuning on CodeT5 and T5 to process contract code and explanations, enhancing task-specific performance. To combine the strengths of each approach, we introduce an Adaptive Mixture-of-Experts architecture. This dynamically adjusts feature weights via a Gating Network, which selects relevant features using TopK filtering and Softmax normalization, and incorporates a Multi-Head Self-Attention mechanism to enhance cross-feature relationships. This design enables effective integration of LLM predictions, explanation features, and code features through gradient optimization. The loss function jointly considers both independent feature performance and overall weighted predictions. Experiments show that SAEL outperforms existing methods across various vulnerabilities.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 28 of its 51 references that are in the map. First posted on arXiv 30 Jul 2025.
Builds on
28 of 51 references.
References · 28
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2019Slither: A Static Analysis Framework For Smart Contractscited by 89
- 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
- 2018Securify: Practical Security Analysis of Smart Contractscited by 61
- 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
- 2023LLaMA-Reviewer: Advancing Code Review Automation with Large Language Models through Parameter-Efficient Fine-Tuningcited by 47
- 2023Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Studycited by 44
- 2023When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?cited by 42
16 more
- 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justificationscited by 41
- 2019Manticore: A User-Friendly Symbolic Execution Framework for Binaries and Smart Contractscited by 37
- 2023Do you still need a manual smart contract audit?cited by 35
- 2024SWE-bench-java: A GitHub Issue Resolving Benchmark for Javacited by 34
- 2019A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defensescited by 25
- 2021Smart Contract Vulnerability Detection: From Pure Neural Network to Interpretable Graph Feature and Expert Pattern Fusioncited by 24
- 2020SmartBugs: A Framework to Analyze Solidity Smart Contractscited by 18
- 2024DeepCRCEval: Revisiting the Evaluation of Code Review Comment Generationcited by 12
- 2023Rethinking Smart Contract Fuzzing: Fuzzing With Invocation Ordering and Important Branch Revisitingcited by 10
- 2024Smart-LLaMA: Two-Stage Post-Training of Large Language Models for Smart Contract Vulnerability Detection and Explanationcited by 8
- 2019Security Analysis Methods on Ethereum Smart Contract Vulnerabilities: A Surveycited by 7
- 2024Improving Smart Contract Security with Contrastive Learning-based Vulnerability Detectioncited by 7
- 2025Smart-LLaMA-DPO: Reinforced Large Language Model for Explainable Smart Contract Vulnerability Detectioncited by 7
- 2017Blockchain-based Smart Contracts: A Systematic Mapping Studycited by 5
- 2018EASYFLOW: Keep Ethereum Away From Overflowcited by 3
- 2025MOS: Towards Effective Smart Contract Vulnerability Detection through Mixture-of-Experts Tuning of Large Language Modelscited by 2
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection
- 2024LLM-SmartAudit: Advanced Smart Contract Vulnerability Detection
- 2025Large Language Model based Smart Contract Auditing with LLMBugScanner
- 2025LLM-BSCVM: An LLM-Based Blockchain Smart Contract Vulnerability Management Framework
- 2024Retrieval Augmented Generation Integrated Large Language Models in Smart Contract Vulnerability Detection
- 2025ETrace:Event-Driven Vulnerability Detection in Smart Contracts via LLM-Based Trace Analysis
- 2024FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMs
- 2025SmartLLM: Smart Contract Auditing using Custom Generative AI