一句话:用大语言模型把自然语言漏洞模式翻译为合约知识图谱查询,自动检测智能合约访问控制漏洞。
传统智能合约分析依赖抽象语法树、控制流图或静态单赋值等中间表示,难以同时刻画语义结构与控制逻辑。知识图谱以实体—关系的方式结构化表示合约代码,可提供更丰富的中间抽象,并支持用图查询语言定位违反规则的代码元素。本文提出 CKG-LLM:利用大语言模型的推理与代码生成能力,把自然语言描述的漏洞模式转换为可在合约知识图谱上执行的查询,从而自动定位存在访问控制缺陷的代码元素。实验评估表明,CKG-LLM 在访问控制漏洞检测上优于现有工具,文章最后还讨论了该框架的潜在扩展方向。
Traditional approaches for smart contract analysis often rely on intermediate representations such as abstract syntax trees, control-flow graphs, or static single assignment form. However, these methods face limitations in capturing both semantic structures and control logic. Knowledge graphs, by contrast, offer a structured representation of entities and relations, enabling richer intermediate abstractions of contract code and supporting the use of graph query languages to identify rule-violating elements. This paper presents CKG-LLM, a framework for detecting access-control vulnerabilities in smart contracts. Leveraging the reasoning and code generation capabilities of large language models, CKG-LLM translates natural-language vulnerability patterns into executable queries over contract knowledge graphs to automatically locate vulnerable code elements. Experimental evaluation demonstrates that CKG-LLM achieves superior performance in detecting access-control vulnerabilities compared to existing tools. Finally, we discuss potential extensions of CKG-LLM as part of future research directions.
@inproceedings{paperbot12048,
title = {CKG-LLM: LLM-Assisted Detection of Smart Contract Access Control Vulnerabilities Based on Knowledge Graphs},
author = {Xiaoqi Li and Hailu Kuang and Wenkai Li and Zongwei Li and Shipeng Ye},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3786582.3786817}
}