Structure-Guided and Semantics-Enhanced Collaborative Code Generation

To improve the quality of pseudocode-to-C++ code generation, this paper proposes a Structure-guided and Semantics-enhanced Collaborative Generation method (SSCGen). By integrating a lightweight translation model and a large language model, SSCGen enhances both the structural diversity and semantic correctness of generated programs. Specifically, it first uses a Mixture-of-Experts (MoE) module within an encoderdecoder architecture to perform line-by-line translation and generate well-formed code fragments. These fragments are then assembled into complete programs via best-first search. The resulting candidates serve as structural guidance for a large model, which further performs semantics-enhanced generation. Experiments on the SPoC dataset demonstrate that SSCGen significantly outperforms existing methods, achieving Pass@100 scores of 77.7% and 85.9% on two test subsets.

Authors

Institutions

Publication Details

Published
2025-05-09
DOI
https://doi.org/10.1109/aemcse65292.2025.11042693
Primary Topic
Service-Oriented Architecture and Web Services
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Structure-Guided and Semantics-Enhanced Collaborative Code Generation

Yanfei Cao, Xingmin Zhang, Daiyuan Yang
Service-Oriented Architecture and Web Services
article

Structure-Guided and Semantics-Enhanced Collaborative Code Generation

Yanfei Cao, Xingmin Zhang, Daiyuan Yang
article en

Abstract

To improve the quality of pseudocode-to-C++ code generation, this paper proposes a Structure-guided and Semantics-enhanced Collaborative Generation method (SSCGen). By integrating a lightweight translation model and a large language model, SSCGen enhances both the structural diversity and semantic correctness of generated programs. Specifically, it first uses a Mixture-of-Experts (MoE) module within an encoderdecoder architecture to perform line-by-line translation and generate well-formed code fragments. These fragments are then assembled into complete programs via best-first search. The resulting candidates serve as structural guidance for a large model, which further performs semantics-enhanced generation. Experiments on the SPoC dataset demonstrate that SSCGen significantly outperforms existing methods, achieving Pass@100 scores of 77.7% and 85.9% on two test subsets.

University of Science and Technology of China (CN)
Openalex Percentile: Top 79%
Service-Oriented Architecture and Web Services
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.