Year
Month

(Preprint) CLSEBERT: Contrastive Learning for Syntax Enhanced Code Pre-Trained Model
Xin Wang ¹, Yasheng Wang ², Pingyi Zhou ², Meng Xiao ², Yadao Wang ², Li Li ³, Xiao Liu ⁴, Hao Wu 武浩 ⁵, Jin Liu 刘进 ¹, Xin Jiang ²
¹ School of Computer Science, Wuhan University 武汉大学 计算机学院
² Noah's Ark Lab, Huawei 华为 诺亚方舟实验室
³ Faculty of Information Technology, Monash University
⁴ School of Information Technology, Deakin University
⁵ School of Information Science and Engineering, Yunnan University 云南大学 信息学院
arXiv , 2021-08-10
Abstract

Pre-trained models for programming languages have proven their significant values in various code-related tasks, such as code search, code clone detection, and code translation. Currently, most pre-trained models treat a code snippet as a sequence of tokens or only focus on the data flow between code identifiers.

However, rich code syntax and hierarchy are ignored which can provide important structure information and semantic rules of codes to help enhance code representations. In addition, although the BERT-based code pre-trained models achieve high performance on many downstream tasks, the native derived sequence representations of BERT are proven to be of low-quality, it performs poorly on code matching and similarity tasks.

To address these problems, we propose CLSEBERT, a Constrastive Learning Framework for Syntax Enhanced Code Pre-Trained Model, to deal with various code intelligence tasks. In the pre-training stage, we consider the code syntax and hierarchy contained in the Abstract Syntax Tree (AST) and leverage the constrastive learning to learn noise-invariant code representations. Besides the masked language modeling (MLM), we also introduce two novel pre-training objectives. One is to predict the edges between nodes in the abstract syntax tree, and the other is to predict the types of code tokens. Through extensive experiments on four code intelligence tasks, we successfully show the effectiveness of our proposed model.
CLSEBERT: Contrastive Learning for Syntax Enhanced Code Pre-Trained Model_1
CLSEBERT: Contrastive Learning for Syntax Enhanced Code Pre-Trained Model_2
CLSEBERT: Contrastive Learning for Syntax Enhanced Code Pre-Trained Model_3
CLSEBERT: Contrastive Learning for Syntax Enhanced Code Pre-Trained Model_4
  • Fast-zoom and high-resolution sparse compound-eye camera based on dual-end collaborative optimization
  • Yi Zheng, Hao-Ran Zhang, Xiao-Wei Li, You-Ran Zhao, Zhao-Song Li, Ye-Hao Hou, Chao Liu, Qiong-Hua Wang
  • Opto-Electronic Advances
  • 2025-06-19
  • Cascaded metasurfaces for adaptive aberration correction
  • Lei Zhang, Tie Jun Cui
  • Opto-Electronic Advances
  • 2025-05-27
  • Embedded solar adaptive optics telescope: achieving compact integration for high-efficiency solar observations
  • Naiting Gu, Hao Chen, Ao Tang, Xinlong Fan, Carlos Quintero Noda, Yawei Xiao, Libo Zhong, Xiaosong Wu, Zhenyu Zhang, Yanrong Yang, Zao Yi, Xiaohu Wu, Linhai Huang, Changhui Rao
  • Opto-Electronic Advances
  • 2025-05-27
  • Spectrally extended line field optical coherence tomography angiography
  • Si Chen, Kan Lin, Xi Chen, Yukun Wang, Chen Hsin Sun, Jia Qu, Xin Ge, Xiaokun Wang, Linbo Liu
  • Opto-Electronic Advances
  • 2025-05-27
  • Wearable photonic smart wristband for cardiorespiratory function assessment and biometric identification
  • Wenbo Li, Yukun Long, Yingyin Yan, Kun Xiao, Zhuo Wang, Di Zheng, Arnaldo Leal-Junior, Santosh Kumar, Beatriz Ortega, Carlos Marques, Xiaoli Li, Rui Min
  • Opto-Electronic Advances
  • 2025-05-27
  • Integrated photonic polarizers with 2D reduced graphene oxide
  • Junkai Hu, Jiayang Wu, Di Jin, Wenbo Liu, Yuning Zhang, Yunyi Yang, Linnan Jia, Yijun Wang, Duan Huang, Baohua Jia, David J. Moss
  • Opto-Electronic Science
  • 2025-05-22
  • Tip-enhanced Raman scattering of glucose molecules
  • Zhonglin Xie, Chao Meng, Donghua Yue, Lei Xu, Ting Mei, Wending Zhang
  • Opto-Electronic Science
  • 2025-05-22
  • Structural color: an emerging nanophotonic strategy for multicolor and functionalized applications
  • Wenhao Wang, Long Wang, Qianqian Fu, Wang Zhang, Liuying Wang, Gu Liu, Youju Huang, Jie Huang, Haoyuan Zhang, Fuqiang Guo, Xiaohu Wu
  • Opto-Electronic Science
  • 2025-04-25
  • Reconfigurable origami chiral response for holographic imaging and information encryption
  • Zhibiao Zhu, Yongfeng Li, Jiafu Wang, Ze Qin, Lixin Jiang, Yang Chen, Shaobo Qu
  • Opto-Electronic Science
  • 2025-04-25
  • Single-layer, cascaded and broadband-heat-dissipation metasurface for multi-wavelength lasers and infrared camouflage
  • Xingdong Feng, Tianqi Zhang, Xuejun Liu, Fan Zhang, Jianjun Wang, Hong Bao, Shan Jiang, YongAn Huang
  • Opto-Electronic Advances
  • 2025-04-02
  • Phase reconstruction via metasurface-integrated quantum analog operation
  • Qiuying Li, Minggui Liang, Shuoqing Liu, Jiawei Liu, Shizhen Chen, Shuangchun Wen, Hailu Luo
  • Opto-Electronic Advances
  • 2025-04-02
  • Full-dimensional complex coherence properties tomography for multi-cipher information security
  • Yonglei Liu, Siting Dai, Yimeng Zhu, Yahong Chen, Peipei Peng, Yangjian Cai, Fei Wang
  • Opto-Electronic Advances
  • 2025-03-31



  • Grassland: A Rapid Algebraic Modeling System for Million-variable Optimization        China's Technology Cooperation with Russia: Geopolitics, Economics, and Regime Security
    About
    |
    Contact
    |
    Copyright © PubCard