EUVIMEDEUVIMED entdecken
Crossref

Less Is More: DocString Compression in Code Generation

Guang Yang, Yu Zhou, Wei Cheng, Xiangyu Zhang, Xiang Chen, Terry Yue Zhuo, Ke Liu, Xin Zhou, David Lo, Taolue Chen

ACM Transactions on Software Engineering and Methodology · 28.02.2026 · 35 (2) · 1-31

DOI: 10.1145/3735636 ↗

Kurz gefasst

Fachartikel in der Zeitschrift ACM Transactions on Software Engineering and Methodology, online erschienen am 21.01.2026. Verfasst von Guang Yang und 9 weiteren Autor:innen. Die Arbeit wurde bisher 6-mal zitiert (Crossref) und nennt 58 Literaturangaben. Gefördert von: National Natural Science Foundation of China, Short-term Visiting Program of Nanjing University of Aeronautics and Astronautics for Ph.D. Students Abroad, High Performance Computing Platform of Nanjing University of Aeronautics and Astronautics, and the Collaborative Innovation Center of Novel Software Technology….

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

The widespread use of Large Language Models (LLMs) in software engineering has intensified the need for improved model and resource efficiency. In particular, for neural code generation, LLMs are used to translate function/method signature and DocString to executable code. DocStrings, which capture user requirements for the code and are typically used as the prompt for LLMs, often contain redundant information. Recent advancements in prompt compression have shown promising results in Natural Language Processing (NLP), but their applicability to code generation remains uncertain. Our empirical study shows that the state-of-the-art prompt compression methods achieve only about 10% reduction, as further reductions would cause significant performance degradation. In our study, we propose a novel compression method, ShortenDoc, dedicated to DocString compression for code generation. Our experiments on six code generation datasets, five open source LLMs (1B to 10B parameters), and one closed-source LLM GPT-4o confirm that ShortenDoc achieves 25–40% compression while preserving the quality of generated code, outperforming other baseline methods at similar compression levels. The benefit of this method is to improve efficiency and reduce the token processing cost while maintaining the quality of the generated code, especially when calling third-party APIs.

Förderung

  • National Natural Science Foundation of China
  • Short-term Visiting Program of Nanjing University of Aeronautics and Astronautics for Ph.D. Students Abroad
  • High Performance Computing Platform of Nanjing University of Aeronautics and Astronautics, and the Collaborative Innovation Center of Novel Software Technology…
  • State Key Laboratory of Novel Software Technology, Nanjing University
  • A*STAR under its 2nd CSIRO and A*STAR: Research-Industry (2+2) Partnership Program

Zitieren

APA

Yang, G., Zhou, Y., Cheng, W., Zhang, X., Chen, X., Zhuo, T. Y., Liu, K., Zhou, X., Lo, D., & Chen, T. (2026). Less Is More: DocString Compression in Code Generation. ACM Transactions on Software Engineering and Methodology, 35(2), 1-31. https://doi.org/10.1145/3735636

Vancouver

Yang G, Zhou Y, Cheng W, Zhang X, Chen X, Zhuo TY, et al. Less Is More: DocString Compression in Code Generation. ACM Transactions on Software Engineering and Methodology. 2026;35(2):1-31. doi:10.1145/3735636

BibTeX
@article{Yang2026,
  author = {Yang, Guang and Zhou, Yu and Cheng, Wei and Zhang, Xiangyu and Chen, Xiang and Zhuo, Terry Yue and Liu, Ke and Zhou, Xin and Lo, David and Chen, Taolue},
  title = {Less Is More: DocString Compression in Code Generation},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2026},
  volume = {35},
  number = {2},
  pages = {1--31},
  doi = {10.1145/3735636}
}
Kostenlos starten →