Guang Yang

Dr. Guang Yang

orcid

Research Focus & Metrics

Academic Career Length

5Years (2022-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
12 August 2024 in IEEE Transactions on Software Engineering
Verified
Journal Article
Closed access
GYGuang Yang
Guang Yang
YZYu Zhou
Yu Zhou
Xiang ChenXiang Chen
Xiang Chen
XZXiangyu Zhang
Xiangyu Zhang
TZTerry Yue Zhuo
Terry Yue Zhuo
TCTaolue Chen
Taolue Chen
Large Language Models (LLMs) have demonstrated remarkable potential in code generation. The integration of Chain of Thought (CoT) reasoning can further boost their performance. However, current CoT methods often require manual writing or LLMs with over 100 billion parameters to generate, impeding their applicability in resource-constrained scenarios. In this study, we investigate lightweight Language Models (ℓLMs), which are defined to have fewer than 10 billion parameters. Empirically, we find that most ℓLMs cannot generate high-quality CoTs when prompted by the few-shot method, but can take advantage of high-quality CoTs generated elsewhere to improve their performance in code generation. Based on these findings, we design a novel approach COTTON which can leverage ℓLMs to automatically generate CoTs for code generation. We synthesize new datasets and conduct extensive experiments on various benchmarks. The results show that the CoTs generated by COTTON outperform the baselines in terms of automated and human evaluation metrics. In particular, the CoTs generated by COTTON boost various ℓLMs to achieve higher performance gains than those generated by LLMs such as ChatGLM (130B), and are competitive with those generated by Gemini and gpt-3.5-turbo. The results also reveal that COTTON not only improves the performance of ℓLMs, but also enhances the performance of LLMs. Our study showcases the potential of ℓLMs in software engineering applications.

1 February 2022 in Knowledge-Based Systems
Verified
Journal Article
Closed access
GYGuang Yang
Guang Yang
KLKe Liu
Ke Liu
Xiang ChenXiang Chen
Xiang Chen
YZYanlin Zhou
Yanlin Zhou
CYChi Yu
Chi Yu
HLHao Lin
Hao Lin

14 March 2024 in ACM Transactions on Software Engineering and Methodology
Verified
Journal Article
Open access
GYGuang Yang
Guang Yang
YZYu Zhou
Yu Zhou
WYWenhua Yang
Wenhua Yang
TYTao Yue
Tao Yue
Xiang ChenXiang Chen
Xiang Chen
TCTaolue Chen
Taolue Chen
Pre-trained code generation models (PCGMs) have been widely applied in neural code generation, which can generate executable code from functional descriptions in natural languages, possibly together with signatures. Despite substantial performance improvement of PCGMs, the role of method names in neural code generation has not been thoroughly investigated. In this article, we study and demonstrate the potential of benefiting from method names to enhance the performance of PCGMs from a model robustness perspective. Specifically, we propose a novel approach, named neu RA l co D e gener A tor R obustifier (RADAR). RADAR consists of two components: RADAR -Attack and RADAR -Defense. The former attacks a PCGM by generating adversarial method names as part of the input, which are semantic and visual similar to the original input but may trick the PCGM to generate completely unrelated code snippets. As a countermeasure to such attacks, RADAR -Defense synthesizes a new method name from the functional description and supplies it to the PCGM. Evaluation results show that RADAR -Attack can reduce the CodeBLEU of generated code by 19.72% to 38.74% in three state-of-the-art PCGMs (i.e., CodeGPT, PLBART, and CodeT5) in the fine-tuning code generation task and reduce the Pass@1 of generated code by 32.28% to 44.42% in three state-of-the-art PCGMs (i.e., Replit, CodeGen, and CodeT5+) in the zero-shot code generation task. Moreover, RADAR -Defense is able to reinstate the performance of PCGMs with synthesized method names. These results highlight the importance of good method names in neural code generation and implicate the benefits of studying model robustness in software engineering.

23 February 2025 in Information and Software Technology
Verified
Journal Article
Closed access
GYGuang Yang
Guang Yang
YZYu Zhou
Yu Zhou
XZXiangyu Zhang
Xiangyu Zhang
Xiang ChenXiang Chen
Xiang Chen
THTingting Han
Tingting Han
TCTaolue Chen
Taolue Chen

14 October 2023 in Empirical Software Engineering
Verified
Journal Article
Closed access
PDF file
GYGuang Yang
Guang Yang
YZYu Zhou
Yu Zhou
Xiang ChenXiang Chen
Xiang Chen
XZXiangyu Zhang
Xiangyu Zhang
YXYiran Xu
Yiran Xu
TCTaolue Chen
Taolue Chen

21 January 2026 in ACM Transactions on Software Engineering and Methodology
Verified
Journal Article
Open access
GYGuang Yang
Guang Yang
YZYu Zhou
Yu Zhou
WCWei Cheng
Wei Cheng
XZXiangyu Zhang
Xiangyu Zhang
Xiang ChenXiang Chen
Xiang Chen
TCTaolue Chen
Taolue Chen
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.