MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learning

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Dai, Zhenlong, Yao, Chang, Han, WenKang, Yuan, Ying, Gao, Zhipeng, Chen, Jingyuan
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912046935703552
author Dai, Zhenlong
Yao, Chang
Han, WenKang
Yuan, Ying
Gao, Zhipeng
Chen, Jingyuan
author_facet Dai, Zhenlong
Yao, Chang
Han, WenKang
Yuan, Ying
Gao, Zhipeng
Chen, Jingyuan
contents Large Language Models (LLMs) have demonstrated great potential for assisting developers in their daily development. However, most research focuses on generating correct code, how to use LLMs to generate personalized code has seldom been investigated. To bridge this gap, we proposed MPCoder (Multi-user Personalized Code Generator) to generate personalized code for multiple users. To better learn coding style features, we utilize explicit coding style residual learning to capture the syntax code style standards and implicit style learning to capture the semantic code style conventions. We train a multi-user style adapter to better differentiate the implicit feature representations of different users through contrastive learning, ultimately enabling personalized code generation for multiple users. We further propose a novel evaluation metric for estimating similarities between codes of different coding styles. The experimental results show the effectiveness of our approach for this novel task.
format Preprint
id arxiv_https___arxiv_org_abs_2406_17255
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learning
Dai, Zhenlong
Yao, Chang
Han, WenKang
Yuan, Ying
Gao, Zhipeng
Chen, Jingyuan
Computation and Language
Large Language Models (LLMs) have demonstrated great potential for assisting developers in their daily development. However, most research focuses on generating correct code, how to use LLMs to generate personalized code has seldom been investigated. To bridge this gap, we proposed MPCoder (Multi-user Personalized Code Generator) to generate personalized code for multiple users. To better learn coding style features, we utilize explicit coding style residual learning to capture the syntax code style standards and implicit style learning to capture the semantic code style conventions. We train a multi-user style adapter to better differentiate the implicit feature representations of different users through contrastive learning, ultimately enabling personalized code generation for multiple users. We further propose a novel evaluation metric for estimating similarities between codes of different coding styles. The experimental results show the effectiveness of our approach for this novel task.
title MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learning
topic Computation and Language
url https://arxiv.org/abs/2406.17255