Semantic-Guided Pruning Approach for Large Language Model-based Class-Level Code Generation

Recent advancements in code generation from natural language have been driven by large language models (LLMs) like GPT-4 and WizardCoder, but current methods often underutilize their capabilities, especially for class-level code generation. The ClassEval benchmark addresses this by focusing on longer, more complex code snippets, but LLMs face challenges with input length constraints. Traditional approaches like zero-shot and few-shot learning struggle with the complexity and length of class-level code, limiting their effectiveness. To overcome this, we propose a semantic-guided pruning method, which optimizes input length through coarse- and fine-grained pruning, retaining only the most semantically relevant tokens. Our method improves LLM performance, increasing pass@1 accuracy by over 4% on the ClassEval benchmark.

Authors

Institutions

Publication Details

Published
2024-12-06
DOI
https://doi.org/10.1109/ricai64321.2024.10911408
Citations
1
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Semantic-Guided Pruning Approach for Large Language Model-based Class-Level Code Generation

Hongyang Chen, Bo Duan, Yunlong Guo, Zhenshun Shi et al.
1 citations
Model-Driven Software Engineering Techniques
0.49
article

Semantic-Guided Pruning Approach for Large Language Model-based Class-Level Code Generation

Hongyang Chen, Bo Duan, Yunlong Guo, Zhenshun Shi, Mingyang Geng
article en
1 citations

Abstract

Recent advancements in code generation from natural language have been driven by large language models (LLMs) like GPT-4 and WizardCoder, but current methods often underutilize their capabilities, especially for class-level code generation. The ClassEval benchmark addresses this by focusing on longer, more complex code snippets, but LLMs face challenges with input length constraints. Traditional approaches like zero-shot and few-shot learning struggle with the complexity and length of class-level code, limiting their effectiveness. To overcome this, we propose a semantic-guided pruning method, which optimizes input length through coarse- and fine-grained pruning, retaining only the most semantically relevant tokens. Our method improves LLM performance, increasing pass@1 accuracy by over 4% on the ClassEval benchmark.

Xichang University (CN)
Quality Education
Openalex Percentile: Top 27%
Model-Driven Software Engineering Techniques
0.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Semantic-Guided Pruning Approach for Large Language Model-based Class-Level Code Generation — Hongyang Chen, Bo Duan, et al. · (2024) | TGRS Research Map | TGRS