跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 计算与语言

arXiv:2203.03850 (cs)
[提交于 2022年3月9日]

标题:UniXcoder: Unified Cross-Modal Pre-training for Code Representation

作者:Daya Guo, Shuai Lu, Nan Duan, Yanlin Wang, Ming Zhou, Jian Yin
查看论文《UniXcoder: Unified Cross-Modal Pre-training for Code Representation》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Pre-trained models for programming languages have recently demonstrated great success on code intelligence. To support both code-related understanding and generation tasks, recent works attempt to pre-train unified encoder-decoder models. However, such encoder-decoder framework is sub-optimal for auto-regressive tasks, especially code completion that requires a decoder-only manner for efficient inference. In this paper, we present UniXcoder, a unified cross-modal pre-trained model for programming language. The model utilizes mask attention matrices with prefix adapters to control the behavior of the model and leverages cross-modal contents like AST and code comment to enhance code representation. To encode AST that is represented as a tree in parallel, we propose a one-to-one mapping method to transform AST in a sequence structure that retains all structural information from the tree. Furthermore, we propose to utilize multi-modal contents to learn representation of code fragment with contrastive learning, and then align representations among programming languages using a cross-modal generation task. We evaluate UniXcoder on five code-related tasks over nine datasets. To further evaluate the performance of code fragment representation, we also construct a dataset for a new task, called zero-shot code-to-code search. Results show that our model achieves state-of-the-art performance on most tasks and analysis reveals that comment and AST can both enhance UniXcoder.
评论: Published in ACL 2022
主题: 计算与语言 (cs.CL); 程序设计语言 (cs.PL); 软件工程 (cs.SE)
引用方式: arXiv:2203.03850 [cs.CL]
  (或者 arXiv:2203.03850v1 [cs.CL] 对于此版本)
  https://doi.org/10.48550/arXiv.2203.03850

提交历史

来自:Daya Guo
[v1] 2022年3月9日 星期三 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.CL
< 上一篇   |   下一篇 >
最新 | 近期 | 2022-03
切换浏览方式为:
cs
cs.PL
cs.SE

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站