paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RAGas: Retrieval Augmented Gas Optimization for Smart Contracts with Continuous Knowledge Integration

RAGas:面向智能合约的检索增强 Gas 优化与持续知识集成
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 2/10 · 该论文把 LLM/RAG 用于智能合约的 Gas 优化改写,属于“用 LLM 做代码优化”的应用型工作,既不是把静态分析/形式化方法用于 ML 系统或 Agentic 程序,也不是用 LLM 改进静态分析与验证,与浮点、贝叶斯程序分析亦无交集;其 12 条 HGC 模式与知识库虽带有一点规则化分析色彩,但核心仍是提示/检索框架在偏门任务上的效果展示,不触及用户关心的理论形式化与问题驱动分析。引用 1 inbox
Xiaoqi Li, Yishun Wang, Wenkai Li, Zongwei Li
crossref: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 RAGas,用检索增强的大模型三阶段框架自动定位并修复智能合约的 Gas 低效问题。

以太坊智能合约的 Gas 费用随计算复杂度增长,降低高 Gas 开销代码对部署成本意义重大,但现有工具依赖固定规则集,无法自主适应不断演化的 Gas 消耗模式。该工作系统分析了导致 Gas 过高的语法与语义特征,构建了覆盖 6 大类、12 种细粒度高 Gas 消耗(HGC)模式及其知识库。在此基础上提出 RAGas——一个三阶段检索增强生成框架,利用大语言模型定位并自动修复 Gas 低效问题,并支持持续知识集成。实验表明,在真实已部署合约上,RAGas 最高可降低 11.2% 的 Gas 使用量。

问题
智能合约执行中的 Gas 费用随计算复杂度上升,而现有优化工具依赖固定规则集,难以自主适应动态演化的 Gas 消耗模式。
方法
系统分析导致高 Gas 消耗的语法与语义特征,构建覆盖 6 大类 12 种细粒度 HGC 模式的知识库,并提出三阶段检索增强生成框架,借助大语言模型定位并自动修复 Gas 低效问题。
评估
在真实世界已部署的智能合约上评估,RAGas 最高可降低 11.2% 的 Gas 使用量。
原文摘要(Abstract)

Ethereum has gradually become an infrastructure in key areas such as finance, healthcare, and supply chain. When its smart contracts are executed, Gas fees increase with the growth of computational complexity. Therefore, reducing code with high Gas overhead while maintaining functional equivalence is of great significance to deployment costs. Currently available tools rely on fixed rule sets and cannot autonomously adapt to the dynamically evolving patterns of Gas consumption. To this end, we systematically analyzed the grammatical and semantic features that lead to excessive Gas consumption and constructed 12 fine-grained High Gas Consumption (HGC) patterns and knowledge bases covering 6 major categories. Based on this, we propose RAGas, a three-stage retrieval enhancement generation framework that utilizes large language models to locate and automatically fix Gas inefficiency issues. The experimental results show that RAGas can reduce Gas usage by up to 11.2% in real world deployed contracts.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11563,
  title = {RAGas: Retrieval Augmented Gas Optimization for Smart Contracts with Continuous Knowledge Integration},
  author = {Xiaoqi Li and Yishun Wang and Wenkai Li and Zongwei Li},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3774748.3795663}
}