TiDPO-SCVD: Token-Importance-Guided Preference Reinforcement LLM for Explainable Smart Contract Vulnerability Detection
Ruize Guo, Dianjun Xie, Biaokai Zhu, Xin Liu, Yixue Geng, Xiangbo Meng
Key points
From the paper's conclusion- To address these issues, we propose TiDPO-SCVD, a token-importance-guided preference reinforcement framework for explainable smart contract vulnerability detection.
Abstract
Smart contract vulnerability detection is a critical challenge in the rapidly evolving blockchain ecosystem. Existing LLM-based auditing approaches face two major bottlenecks: (1) generated explanations often suffer from logical inconsistency and omission of key risk indicators, and (2) conventional preference optimization (e.g., DPO) performs only coarse sequence-level tuning, suffering from the inherent "lost-in-the-middle" bias that overlooks mid-sequence vulnerability-critical tokens. To address these issues, we propose TiDPO-SCVD, a token-importance-guided preference reinforcement framework for explainable smart contract vulnerability detection. Our method adopts a three-stage pipeline: continual pre-training on large-scale smart contract corpora to inject domain-specific security knowledge; multi-task supervised fine-tuning with a joint loss to simultaneously optimize detection accuracy and explanation completeness; and a hybrid token-weighting mechanism that integrates gradient attribution with Gaussian positional priors, combined with triplet regularization, to achieve fine-grained preference alignment at the token level. Extensive experiments on four prevalent vulnerability types, including reentrancy, timestamp dependency, integer overflow, and delegatecall exploits, show that TiDPO-SCVD consistently outperforms existing competitive methods across detection metrics. Moreover, both automatic LLM scoring and human expert evaluations confirm that our generated audit reports achieve superior performance in logical correctness, comprehensiveness, and interpretive clarity.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- MOS: Towards Effective Smart Contract Vulnerability Detection through Mixture-of-Experts Tuning of Large Language ModelsACM Transactions on Software Engineering and Methodology · 2026
- SecureFlow: An LLM-Based Multi-Agent System for Automated Smart Contract Vulnerability Detection and PatchingJournal of Cybersecurity and Privacy · 2026
- SmartCoder-R1: Towards Secure and Explainable Smart Contract Generation with Security-Aware Group Relative Policy OptimizationProceedings of the ACM on software engineering. · 2026
- Where Do the Tokens Go? Understanding and Reducing Costs in LLM Agents for Vulnerability DiscoveryarXiv · 2026
- DG-VDT: Dynamic Graph-Guided Reinforcement Learning for Low-Latency Vulnerability Detection and Attack Traceability in Ethereum Smart ContractsApplied Sciences · 2026
- Frequency-Aware Continual Learning for Smart Contract Vulnerability Detection with Large Language ModelsarXiv · 2026