RuleFlow : Generating Reusable Program Optimizations with LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Singh, Avaljot, Bharadwaj, Dushyant, Baziotis, Stefanos, Varadharajan, Kaushik, Mendis, Charith
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910016816021504
author Singh, Avaljot
Bharadwaj, Dushyant
Baziotis, Stefanos
Varadharajan, Kaushik
Mendis, Charith
author_facet Singh, Avaljot
Bharadwaj, Dushyant
Baziotis, Stefanos
Varadharajan, Kaushik
Mendis, Charith
contents Optimizing Pandas programs is a challenging problem. Existing systems and compiler-based approaches offer reliability but are either heavyweight or support only a limited set of optimizations. Conversely, using LLMs in a per-program optimization methodology can synthesize nontrivial optimizations, but is unreliable, expensive, and offers a low yield. In this work, we introduce a hybrid approach that works in a 3-stage manner that decouples discovery from deployment and connects them via a novel bridge. First, it discovers per-program optimizations (discovery). Second, they are converted into generalised rewrite rules (bridge). Finally, these rules are incorporated into a compiler that can automatically apply them wherever applicable, eliminating repeated reliance on LLMs (deployment). We demonstrate that RuleFlow is the new state-of-the-art (SOTA) Pandas optimization framework on PandasBench, a challenging Pandas benchmark consisting of Python notebooks. Across these notebooks, we achieve a speedup of up to 4.3x over Dias, the previous compiler-based SOTA, and 1914.9x over Modin, the previous systems-based SOTA. Our code is available at https://github.com/ADAPT-uiuc/RuleFlow.
format Preprint
id arxiv_https___arxiv_org_abs_2602_09051
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle RuleFlow : Generating Reusable Program Optimizations with LLMs
Singh, Avaljot
Bharadwaj, Dushyant
Baziotis, Stefanos
Varadharajan, Kaushik
Mendis, Charith
Software Engineering
Artificial Intelligence
Optimizing Pandas programs is a challenging problem. Existing systems and compiler-based approaches offer reliability but are either heavyweight or support only a limited set of optimizations. Conversely, using LLMs in a per-program optimization methodology can synthesize nontrivial optimizations, but is unreliable, expensive, and offers a low yield. In this work, we introduce a hybrid approach that works in a 3-stage manner that decouples discovery from deployment and connects them via a novel bridge. First, it discovers per-program optimizations (discovery). Second, they are converted into generalised rewrite rules (bridge). Finally, these rules are incorporated into a compiler that can automatically apply them wherever applicable, eliminating repeated reliance on LLMs (deployment). We demonstrate that RuleFlow is the new state-of-the-art (SOTA) Pandas optimization framework on PandasBench, a challenging Pandas benchmark consisting of Python notebooks. Across these notebooks, we achieve a speedup of up to 4.3x over Dias, the previous compiler-based SOTA, and 1914.9x over Modin, the previous systems-based SOTA. Our code is available at https://github.com/ADAPT-uiuc/RuleFlow.
title RuleFlow : Generating Reusable Program Optimizations with LLMs
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2602.09051