Man-Made Heuristics Are Dead. Long Live Code Generators!
Rohit Dwivedula, Divyanshu Saxena, Aditya Akella, Swarat Chaudhuri, Daehyeok Kim
TL;DR
The paper tackles the brittleness of hand-crafted system policies by reframing policy design as an automated search problem guided by LLM-generated code. PolicySmith combines a Template-Evaluator-Checker pipeline with evolutionary search to synthesize instance-optimal policies tailored to specific workloads and hardware, demonstrated on web caching and Linux kernel congestion control. Empirical results show PolicySmith-generated cache heuristics outperform multiple baselines on real traces, and kernel-space experiments illustrate feasibility despite safety constraints. The work points to a practical path toward self-evolving, context-aware system policies while outlining open challenges in context drift detection, cross-policy coordination, and offline evaluation.
Abstract
Policy design for various systems controllers has conventionally been a manual process, with domain experts carefully tailoring heuristics for the specific instance in which the policy will be deployed. In this paper, we re-imagine policy design via a novel automated search technique fueled by recent advances in generative models, specifically Large Language Model (LLM)-driven code generation. We outline the design and implementation of PolicySmith, a framework that applies LLMs to synthesize instance-optimal heuristics. We apply PolicySmith to two long-standing systems policies - web caching and congestion control, highlighting the opportunities unraveled by this LLM-driven heuristic search. For caching, PolicySmith discovers heuristics that outperform established baselines on standard open-source traces. For congestion control, we show that PolicySmith can generate safe policies that integrate directly into the Linux kernel.
