Search-Based LLMs for Code Optimization

编码(集合论) 计算机科学 程序设计语言 集合(抽象数据类型)
作者
Shuzheng Gao,Cuiyun Gao,Wenchao Gu,Michael R. Lyu
出处
期刊:Cornell University - arXiv [Cornell University]
标识
DOI:10.48550/arxiv.2408.12159
摘要

The code written by developers usually suffers from efficiency problems and contain various performance bugs. These inefficiencies necessitate the research of automated refactoring methods for code optimization. Early research in code optimization employs rule-based methods and focuses on specific inefficiency issues, which are labor-intensive and suffer from the low coverage issue. Recent work regards the task as a sequence generation problem, and resorts to deep learning (DL) techniques such as large language models (LLMs). These methods typically prompt LLMs to directly generate optimized code. Although these methods show state-of-the-art performance, such one-step generation paradigm is hard to achieve an optimal solution. First, complex optimization methods such as combinatorial ones are hard to be captured by LLMs. Second, the one-step generation paradigm poses challenge in precisely infusing the knowledge required for effective code optimization within LLMs, resulting in under-optimized code.To address these problems, we propose to model this task from the search perspective, and propose a search-based LLMs framework named SBLLM that enables iterative refinement and discovery of improved optimization methods. SBLLM synergistically integrate LLMs with evolutionary search and consists of three key components: 1) an execution-based representative sample selection part that evaluates the fitness of each existing optimized code and prioritizes promising ones to pilot the generation of improved code; 2) an adaptive optimization pattern retrieval part that infuses targeted optimization patterns into the model for guiding LLMs towards rectifying and progressively enhancing their optimization methods; and 3) a genetic operator-inspired chain-of-thought prompting part that aids LLMs in combining different optimization methods and generating improved optimization methods.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
鲤鱼坤完成签到,获得积分10
刚刚
风中碧菡完成签到,获得积分10
3秒前
上官若男的应助被152455采纳,获得10
4秒前
yulian完成签到,获得积分10
4秒前
小贾完成签到 ,获得积分10
5秒前
8秒前
许若南完成签到 ,获得积分10
8秒前
满眼皆星辰完成签到 ,获得积分10
9秒前
领导范儿的应助被zzhui采纳,获得10
12秒前
Axel完成签到,获得积分10
12秒前
Heart_of_Stone完成签到 ,获得积分10
14秒前
14秒前
悟空完成签到,获得积分10
18秒前
daomaihu发布了新的文献求助100
20秒前
Best1完成签到 ,获得积分10
25秒前
两句话完成签到,获得积分10
27秒前
梁白开完成签到,获得积分10
28秒前
学术霸王完成签到,获得积分10
29秒前
搜集达人的应助被152455采纳,获得10
29秒前
masirui的应助被科研通管家采纳,获得20
30秒前
luckycc完成签到,获得积分10
30秒前
Pendragon完成签到,获得积分10
33秒前
哥哥完成签到 ,获得积分10
34秒前
依稀完成签到,获得积分10
34秒前
气煞我也完成签到 ,获得积分10
36秒前
鲤鱼小蕾完成签到 ,获得积分10
37秒前
逆天云完成签到 ,获得积分10
38秒前
文艺信封完成签到,获得积分10
43秒前
学无止境完成签到 ,获得积分10
52秒前
程志强完成签到 ,获得积分10
53秒前
daomaihu发布了新的文献求助100
55秒前
56秒前
57秒前
许安完成签到 ,获得积分10
59秒前
Leo完成签到 ,获得积分10
1分钟前
威武青寒完成签到,获得积分10
1分钟前
HHW完成签到,获得积分10
1分钟前
damaozi完成签到,获得积分10
1分钟前
加选完成签到 ,获得积分10
1分钟前
daomaihu发布了新的文献求助100
1分钟前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Les Mantodea De Guyane 2000
Energie-Contracting 1500
Klimaschutzrecht durch den Energiesektor im Mehrebenensystem – Ein Rechtsvergleich 1000
Stochastic Models in Operations Research,Vol. 2 600
Guidelines for fracture-safe and fatigue-reliable design of steel structures 600
Problems and Solutions for Integer and Combinatorial Optimization: Building Skills in Discrete Optimization 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 计算机科学 工程类 有机化学 化学工程 生物化学 物理 复合材料 内科学 催化作用 光电子学 人工智能 细胞生物学 无机化学 物理化学 数学
热门帖子
关注 科研通微信公众号,转发送积分 8023810
求助须知:如何正确求助?哪些是违规求助? 9466162
关于积分的说明 21216427
捐赠科研通 7594482
什么是DOI,文献DOI怎么找? 3387074
关于科研通互助平台的介绍 2519728
邀请新用户注册赠送积分活动 2422923