CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation
Yue Wang, Weishi Wang, Shafiq Joty, and Steven C.H. Hoi

TL;DR
CodeT5 is a unified encoder-decoder model that leverages identifier semantics and multi-task learning to improve code understanding and generation tasks, outperforming prior methods.
Contribution
It introduces a novel identifier-aware pre-training task and a bimodal dual generation task for better code semantics understanding and NL-PL alignment.
Findings
Outperforms prior methods on code understanding tasks like defect and clone detection.
Achieves state-of-the-art results on code generation tasks across multiple directions.
Better captures semantic information from code through specialized pre-training.
Abstract
Pre-trained models for Natural Languages (NL) like BERT and GPT have been recently shown to transfer well to Programming Languages (PL) and largely benefit a broad set of code-related tasks. Despite their success, most current methods either rely on an encoder-only (or decoder-only) pre-training that is suboptimal for generation (resp. understanding) tasks or process the code snippet in the same way as NL, neglecting the special characteristics of PL such as token types. We present CodeT5, a unified pre-trained encoder-decoder Transformer model that better leverages the code semantics conveyed from the developer-assigned identifiers. Our model employs a unified framework to seamlessly support both code understanding and generation tasks and allows for multi-task learning. Besides, we propose a novel identifier-aware pre-training task that enables the model to distinguish which code…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗Salesforce/codet5-base-multi-summodel· 720 dl· ♡ 32720 dl♡ 32
- 🤗Salesforce/codet5-basemodel· 15k dl· ♡ 13215k dl♡ 132
- 🤗Salesforce/codet5-smallmodel· 14k dl· ♡ 8114k dl♡ 81
- 🤗SaulLu/cotet5_small_fixmodel· 32 dl· ♡ 132 dl♡ 1
- 🤗Salesforce/codet5-largemodel· 2.0k dl· ♡ 742.0k dl♡ 74
- 🤗Salesforce/codet5-large-ntp-pymodel· 475 dl· ♡ 27475 dl♡ 27
- 🤗dorkai/codeX-1.0model· ♡ 8♡ 8
- 🤗gangqinxiao13/fine-tuned-codet5model· ♡ 2♡ 2
- 🤗amgharhind/srd2plantUml_codet5base_V2model· ♡ 2♡ 2
- 🤗Santiago-ampudia/codet5-base-multi-summodel· 1 dl1 dl
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Malware Detection Techniques · Topic Modeling
MethodsGated Linear Unit · Attention Is All You Need · Linear Layer · Absolute Position Encodings · Position-Wise Feed-Forward Layer · SentencePiece · Inverse Square Root Schedule · Adafactor · T5 · CodeT5
