vix.ing · top · new · best · stats · spec

Exploring Code Style Transfer with Neural Networks

2022/09/13 by Karl Munson, Anish Savla, Munson, Karl +9 · 1 citation
Computer Science · #Computation and Language (cs.CL) #Computational Physics and Python Applications #FOS: Computer and information sciences #Software Engineering Research #Topic Modeling

paper · pdf · doi:10.48550/arxiv.2209.06273

openalex publication_date 2022/09/13 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Style is a significant component of natural language text, reflecting a change in the tone of text while keeping the underlying information the same. Even though programming languages have strict syntax rules, they also have style. Code can be written with the same functionality but using different language features. However, programming style is difficult to quantify, and thus as part of this work, we define style attributes, specifically for Python. To build a definition of style, we utilized hierarchical clustering to capture a style definition without needing to specify transformations. In addition to defining style, we explore the capability of a pre-trained code language model to capture information about code style. To do this, we fine-tuned pre-trained code-language models and evaluated their performance in code style transfer tasks.

Cited by

Related