EffiSkel boosts LLM code efficiency by 11% with skeleton patterns
New framework teaches LLMs to generate code that runs 36% faster on average.
A team of researchers from multiple institutions has introduced EffiSkel, a novel framework designed to make code generated by large language models (LLMs) not just syntactically correct, but also significantly faster. While LLMs like DeepSeek-Coder (7B parameter version) can already produce functionally complete programs, these outputs often run much slower than human-written code. Previous attempts to fix this—such as iterative post-generation optimization or fine-tuning on efficient codebases—fail to explicitly teach the underlying structural patterns that drive runtime performance. EffiSkel addresses this by extracting and learning “efficiency skeletons”: abstract, reusable patterns hidden within complex syntax and control flows. The framework uses three complementary strategies to capture these patterns and integrates them into a multi-task learning regime that jointly optimizes code generation and skeleton prediction.
On the Mercury benchmark, EffiSkel delivers impressive results: an 11.11% higher Efficiency Ratio compared to the prior state-of-the-art method EffiCoder, and a 3.71% improvement over CodeDPO. It also achieves a +0.36 increase in Average Speedup (AS) over EffiCoder and +0.22 over CodeDPO. These gains hold across multiple programming languages, demonstrating the framework’s generalizability. By explicitly modeling efficiency-oriented structural patterns, EffiSkel helps LLMs produce code that is both correct and optimized for high runtime performance—a critical step toward making AI-generated software production-ready. The paper, currently available on arXiv, highlights a promising direction for embedding performance awareness directly into the training process of code-generating models.
- EffiSkel extracts 'efficiency skeletons'—abstract structural patterns for fast code—using three complementary strategies.
- On Mercury, it achieves +11.11% Efficiency Ratio over EffiCoder and +3.71% over CodeDPO with DeepSeek-Coder (7B).
- Multitask learning combines code generation and skeleton prediction without hurting functional correctness.
Why It Matters
Faster AI-generated code means shorter debugging cycles and lower cloud compute costs for developers and enterprises.