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
  • Filament based ionizing radiation sensing
  • Pengfei Qi, Haiyi Liu, Jiewei Guo, Nan Zhang, Lu Sun, Shishi Tao, Binpeng Shang, Lie Lin Weiwei Liu
  • Opto-Electronic Advances
  • 2025-12-25
  • Separation and identification of mixed signal for distributed acoustic sensor using deep learning
  • Huaxin Gu, Jingming Zhang, Xingwei Chen, Feihong Yu, Deyu Xu, Shuaiqi Liu, Weihao Lin, Xiaobing Shi, Zixing Huang, Xiongji Yang, Qingchang Hu, Liyang Shao
  • Opto-Electronic Advances
  • 2025-11-25
  • Scale-invariant 3D face recognition using computer-generated holograms and the Mellin transform
  • Yongwei Yao, Yaping Zhang, Huanrong He, Xianfeng David Gu, Daping Chu, Ting-Chung Poon
  • Opto-Electronic Advances
  • 2025-11-25
  • Partially coherent optical chip enables physical-layer public-key encryption
  • Bo Wu, Wenkai Zhang, Hailong Zhou, Jianji Dong, Yilun Wang, Xinliang Zhang
  • Opto-Electronic Advances
  • 2025-11-25
  • Advanced applications of pulsed laser deposition in electrocatalysts for hydrogen-electric conversion systems
  • Yuanyuan Zhou, Yong Wang, Ke Zhang, Huaqian Leng, Peter Müller-Buschbaum, Nian Li, Liang Qiao
  • Opto-Electronic Advances
  • 2025-11-25
  • A review on optical torques: from engineered light fields to objects
  • Tao He, Jingyao Zhang, Din Ping Tsai, Junxiao Zhou, Haiyang Huang, Weicheng Yi, Zeyong Wei Yan Zu, Qinghua Song, Zhanshan Wang, Cheng-Wei Qiu, Yuzhi Shi, Xinbin Cheng
  • Opto-Electronic Science
  • 2025-11-25
  • IncepHoloRGB: multi-wavelength network model for full-color 3D computer-generated holography
  • Xuan Yu, Zhilin Teng, Xuhao Fan, Tianchi Liu, Wenbin Chen, Xinger Wang, Zhe Zhao, Wei Xiong, Hui Gao
  • Opto-Electronic Advances
  • 2025-10-25
  • Dual-band-tunable all-inorganic Zn-based metal halides for optical anti-counterfeiting
  • Meng Wang, Dehai Liang1, Saif M. H. Qaid, Shuangyi Zhao, Yingjie Liu, Zhigang Zang
  • Opto-Electronic Advances
  • 2025-10-25
  • Superchirality induced ultrasensitive chiral detection in high-Q optical cavities
  • Tianxu Jia, Youngsun Jeon Lv Feng Hongyoon Kim, Bingjue Li, Guanghao Rui, Junsuk Rho
  • Opto-Electronic Advances
  • 2025-10-25
  • Unsupervised learning enabled label-free single-pixel imaging for resilient information transmission through unknown dynamic scattering media
  • Fujie Li, Haoyu Zhang, Zhilan Lu, Li Yao, Yuan Wei, Ziwei Li, Feng Bao, Junwen Zhang, Yingjun Zhou, Nan Chi
  • Opto-Electronic Advances
  • 2025-10-25
  • Simultaneous detection of inflammatory process indicators via operando dual lossy mode resonance-based biosensor
  • Desiree Santano, Abian B. Socorro, Ambra Giannetti, Ignacio Del Villar, Francesco Chiavaioli
  • Opto-Electronic Science
  • 2025-10-16
  • Noncommutative metasurfaces enabled diverse quantum path entanglement of structured photons
  • Yan Wang, Yichang Shou, Jiawei Liu, Qiang Yang, Shizhen Chen, Weixing Shu, Shuangchun Wen, Hailu Luo
  • Opto-Electronic Science
  • 2025-10-16



  • 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