ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation
Sicong Liu, Yanxian Huang, Mingwei Liu, Jiachi Chen, Ensheng Shi, Yuchi Ma, Hongyu Zhang, Yin Zhang, Yanlin Wang

TL;DR
ShortCoder is a framework that enhances token efficiency in code generation by applying syntax simplification rules, a hybrid data synthesis pipeline, and fine-tuning strategies, leading to significant improvements without sacrificing code quality.
Contribution
It introduces syntax-level simplification rules, a hybrid data synthesis pipeline, and a fine-tuning strategy to improve token efficiency in code generation models.
Findings
Achieves 18.1%-37.8% token reduction in code generation.
Outperforms state-of-the-art methods on HumanEval.
Maintains code correctness and readability despite simplifications.
Abstract
Code generation tasks aim to automate the conversion of user requirements into executable code, significantly reducing manual development efforts and enhancing software productivity. The emergence of large language models (LLMs) has significantly advanced code generation, though their efficiency is still impacted by certain inherent architectural constraints. Each token generation necessitates a complete inference pass, requiring persistent retention of contextual information in memory and escalating resource consumption. While existing research prioritizes inference-phase optimizations such as prompt compression and model quantization, the generation phase remains underexplored. To tackle these challenges, we propose a knowledge-infused framework named ShortCoder, which optimizes code generation efficiency while preserving semantic equivalence and readability. In particular, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Software Engineering Research · Natural Language Processing Techniques
