Standard

Style2Code: A dual-modal contrastive learning framework for style-controllable code generation. / Zhang, Dutao; He, Yulong; Arroyo Arias, Nicolas Rafael; Li, Boyi; Kovalchuk, Sergey.

в: Automated Software Engineering, Том 34, № 1, 07.11.2026.

Результаты исследований: Научные публикации в периодических изданиях › статья › Рецензирование

Harvard

Zhang, D, He, Y, Arroyo Arias, NR, Li, B & Kovalchuk, S 2026, 'Style2Code: A dual-modal contrastive learning framework for style-controllable code generation', Automated Software Engineering, Том. 34, № 1. https://doi.org/10.1007/s10515-026-00704-y

APA

Zhang, D., He, Y., Arroyo Arias, N. R., Li, B., & Kovalchuk, S. (2026). Style2Code: A dual-modal contrastive learning framework for style-controllable code generation. Automated Software Engineering, 34(1). https://doi.org/10.1007/s10515-026-00704-y

Vancouver

Zhang D, He Y, Arroyo Arias NR, Li B, Kovalchuk S. Style2Code: A dual-modal contrastive learning framework for style-controllable code generation. Automated Software Engineering. 2026 Нояб. 7;34(1). https://doi.org/10.1007/s10515-026-00704-y

Author

Zhang, Dutao ; He, Yulong ; Arroyo Arias, Nicolas Rafael ; Li, Boyi ; Kovalchuk, Sergey. / Style2Code: A dual-modal contrastive learning framework for style-controllable code generation. в: Automated Software Engineering. 2026 ; Том 34, № 1.

BibTeX

@article{e66d368d567a451ba42c25798ac86f7e,
title = "Style2Code: A dual-modal contrastive learning framework for style-controllable code generation",
abstract = "Controllable code generation aims to move source code toward a target coding style while preserving program behavior. Direct prompting may neither describe fine-grained style precisely nor reliably perform the requested transformation; it can preserve the source and achieve high correctness without effective style transfer. We propose Style2Code, a dual-modal framework that extracts an explicit 34-dimensional target-style profile spanning naming, layout, and function-level structure. A lightweight style encoder and contrastive learning align this profile with code representations before generation. Experiments on five synthetic and human-written benchmarks assess reference and source-relative style similarity, static and execution correctness, and copying. In controlled comparisons, Style2Code improves lexical reference similarity and target-style alignment over its backbone and same-backbone trained alternatives. Style2Code-9B achieves positive mean source-relative style improvement on all five datasets and lower copy rates than untuned Qwen Prompt and the evaluated API models, indicating active migration rather than source preservation alone. These gains do not consistently extend to CodeBLEU, static quality, Syntax, or Pass@1 because active style modification can introduce parsing, execution, and behavioral errors. Test-time repair recovers many failures but may increase source retention and is reported separately. Style2Code provides an interpretable mechanism for quantifiable, non-copy style transfer, while reliable function preservation remains an open challenge.",
author = "Dutao Zhang and Yulong He and {Arroyo Arias}, {Nicolas Rafael} and Boyi Li and Sergey Kovalchuk",
year = "2026",
month = nov,
day = "7",
doi = "10.1007/s10515-026-00704-y",
language = "English",
volume = "34",
journal = "Automated Software Engineering",
issn = "0928-8910",
publisher = "Springer Nature",
number = "1",

}

RIS

TY - JOUR

T1 - Style2Code: A dual-modal contrastive learning framework for style-controllable code generation

AU - Zhang, Dutao

AU - He, Yulong

AU - Arroyo Arias, Nicolas Rafael

AU - Li, Boyi

AU - Kovalchuk, Sergey

PY - 2026/11/7

Y1 - 2026/11/7

N2 - Controllable code generation aims to move source code toward a target coding style while preserving program behavior. Direct prompting may neither describe fine-grained style precisely nor reliably perform the requested transformation; it can preserve the source and achieve high correctness without effective style transfer. We propose Style2Code, a dual-modal framework that extracts an explicit 34-dimensional target-style profile spanning naming, layout, and function-level structure. A lightweight style encoder and contrastive learning align this profile with code representations before generation. Experiments on five synthetic and human-written benchmarks assess reference and source-relative style similarity, static and execution correctness, and copying. In controlled comparisons, Style2Code improves lexical reference similarity and target-style alignment over its backbone and same-backbone trained alternatives. Style2Code-9B achieves positive mean source-relative style improvement on all five datasets and lower copy rates than untuned Qwen Prompt and the evaluated API models, indicating active migration rather than source preservation alone. These gains do not consistently extend to CodeBLEU, static quality, Syntax, or Pass@1 because active style modification can introduce parsing, execution, and behavioral errors. Test-time repair recovers many failures but may increase source retention and is reported separately. Style2Code provides an interpretable mechanism for quantifiable, non-copy style transfer, while reliable function preservation remains an open challenge.

AB - Controllable code generation aims to move source code toward a target coding style while preserving program behavior. Direct prompting may neither describe fine-grained style precisely nor reliably perform the requested transformation; it can preserve the source and achieve high correctness without effective style transfer. We propose Style2Code, a dual-modal framework that extracts an explicit 34-dimensional target-style profile spanning naming, layout, and function-level structure. A lightweight style encoder and contrastive learning align this profile with code representations before generation. Experiments on five synthetic and human-written benchmarks assess reference and source-relative style similarity, static and execution correctness, and copying. In controlled comparisons, Style2Code improves lexical reference similarity and target-style alignment over its backbone and same-backbone trained alternatives. Style2Code-9B achieves positive mean source-relative style improvement on all five datasets and lower copy rates than untuned Qwen Prompt and the evaluated API models, indicating active migration rather than source preservation alone. These gains do not consistently extend to CodeBLEU, static quality, Syntax, or Pass@1 because active style modification can introduce parsing, execution, and behavioral errors. Test-time repair recovers many failures but may increase source retention and is reported separately. Style2Code provides an interpretable mechanism for quantifiable, non-copy style transfer, while reliable function preservation remains an open challenge.

U2 - 10.1007/s10515-026-00704-y

DO - 10.1007/s10515-026-00704-y

M3 - Article

VL - 34

JO - Automated Software Engineering

JF - Automated Software Engineering

SN - 0928-8910

IS - 1

ER -

ID: 163732983