RL fine-tuned version of DeepSeek-R1-Distill-Qwen-7B for detecting vulnerabilities in Solidity smart contracts. Fine-tuned using GRPO (Group Relative Policy Optimization) with LoRA on the CGT (Consolidated Ground Truth) dataset.
Model Description
Base model: deepseek-ai/DeepSeek-R1-Distill-Qwen-7B
Fine-tuning method: GRPO + LoRA
Task: Smart contract vulnerability detection and classification
Outcome reward only. The reward function validates whether the final label is correct, not whether the reasoning is valid. The model may produce plausible-sounding analysis that doesn't actually justify the conclusion.
SWC ID regression. Post-training SWC ID accuracy dropped to zero. The model prioritised the higher-weighted binary detection reward at the expense of fine-grained weakness classification.
Context window. Contracts exceeding ~4,000 characters were excluded from training. Performance on very large contracts is untested.
Citation
bibtex
1@misc{pandav2026scvulnrl,
2 author = {Pandav, Nishant},
3 title = {Smart Contract Vulnerability Detection via RL Fine-Tuning},
4 year = {2026},
5 url = {https://github.com/npanium/smartcontracts-vulnerability-r1}
6}