ACL 2026 Findings</p>\n","updatedAt":"2026-06-30T18:28:27.116Z","author":{"_id":"638d4b18ebda86f24b5f6391","avatarUrl":"/avatars/e8c518457c25c6444084ec56c28b20c1.svg","fullname":"Sagnik Anupam","name":"sagnikanupam","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":1,"identifiedLanguage":{"language":"en","probability":0.4728822112083435},"editors":["sagnikanupam"],"editorAvatarUrls":["/avatars/e8c518457c25c6444084ec56c28b20c1.svg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2501.18916","authors":[{"_id":"6a440a1741f04ae4d7ad95bf","name":"Sagnik Anupam","hidden":false},{"_id":"6a440a1741f04ae4d7ad95c0","name":"Alexander Shypula","hidden":false},{"_id":"6a440a1741f04ae4d7ad95c1","name":"Osbert Bastani","hidden":false}],"publishedAt":"2026-06-23T00:00:00.000Z","submittedOnDailyAt":"2026-06-30T00:00:00.000Z","title":"LLM Program Optimization via Retrieval Augmented Search","submittedOnDailyBy":{"_id":"638d4b18ebda86f24b5f6391","avatarUrl":"/avatars/e8c518457c25c6444084ec56c28b20c1.svg","isPro":false,"fullname":"Sagnik Anupam","user":"sagnikanupam","type":"user","name":"sagnikanupam"},"summary":"Recent work has demonstrated the potential of large language models (LLMs) for program optimization, a key challenge in programming languages. We propose a blackbox adaptation method called Retrieval Augmented Search (RAS) that performs beam search over candidate optimizations; at each step, it retrieves in-context examples from a given training dataset of slow-fast program pairs to guide the LLM. Critically, we find that performing contextual retrieval based on an LLM-generated natural language description significantly outperforms retrieval based on the source code. We also propose AEGIS, a method for improving interpretability by decomposing training examples into ''atomic edits'' that are significantly more incremental in nature. We show that RAS performs up to 2.06times better than prior state-of-the-art blackbox adaptation strategies on optimizing C++ programs, and that AEGIS performs up to 1.37times better while making significantly smaller edits. We also show that using RAS improves the mean runtime percentile of Python programs by 10.27 compared to baselines.","upvotes":2,"discussionId":"6a440a1741f04ae4d7ad95c2","projectPage":"https://sagnikanupam.com/papers/llmprogramoptimization/index.html","githubRepo":"https://github.com/sagnikanupam/llmprogramoptimization","githubRepoAddedBy":"user","ai_summary":"Blackbox adaptation methods using retrieval-augmented search and atomic edit decomposition improve program optimization performance for both C++ and Python code.","ai_keywords":["large language models","program optimization","blackbox adaptation","retrieval augmented search","beam search","in-context examples","natural language description","source code","AEGIS","atomic edits","C++","Python"],"ai_summary_model":"Qwen/Qwen2.5-Coder-32B-Instruct","githubStars":2,"organization":{"_id":"633cfd005d7b7741bef6aa99","name":"upenn","fullname":"University of Pennsylvania","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/68e396f2b5bb631e9b2fac9a/FFSbROS6R8vPMIyXb7iIU.png"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"63ac5701c21e60a3e9b58aa7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/63ac5701c21e60a3e9b58aa7/g6EX7diOpuA94R2ab-rZC.png","isPro":true,"fullname":"Dipankar Sarkar","user":"dipankarsarkar","type":"user"},{"_id":"638d4b18ebda86f24b5f6391","avatarUrl":"/avatars/e8c518457c25c6444084ec56c28b20c1.svg","isPro":false,"fullname":"Sagnik Anupam","user":"sagnikanupam","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":0,"organization":{"_id":"633cfd005d7b7741bef6aa99","name":"upenn","fullname":"University of Pennsylvania","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/68e396f2b5bb631e9b2fac9a/FFSbROS6R8vPMIyXb7iIU.png"},"markdownContentUrl":"https://huggingface.co/buckets/huggingchat/papers-content/resolve/2501/2501.18916.md","query":{}}">
LLM Program Optimization via Retrieval Augmented Search
Abstract
Blackbox adaptation methods using retrieval-augmented search and atomic edit decomposition improve program optimization performance for both C++ and Python code.
Recent work has demonstrated the potential of large language models (LLMs) for program optimization, a key challenge in programming languages. We propose a blackbox adaptation method called Retrieval Augmented Search (RAS) that performs beam search over candidate optimizations; at each step, it retrieves in-context examples from a given training dataset of slow-fast program pairs to guide the LLM. Critically, we find that performing contextual retrieval based on an LLM-generated natural language description significantly outperforms retrieval based on the source code. We also propose AEGIS, a method for improving interpretability by decomposing training examples into ''atomic edits'' that are significantly more incremental in nature. We show that RAS performs up to 2.06times better than prior state-of-the-art blackbox adaptation strategies on optimizing C++ programs, and that AEGIS performs up to 1.37times better while making significantly smaller edits. We also show that using RAS improves the mean runtime percentile of Python programs by 10.27 compared to baselines.
Community
Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images
Cite arxiv.org/abs/2501.18916 in a model README.md to link it from this page.
Cite arxiv.org/abs/2501.18916 in a dataset README.md to link it from this page.
Cite arxiv.org/abs/2501.18916 in a Space README.md to link it from this page.
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.