Structure-aware Fine-tuning for Code Pre-trained Models
Not on the map. Why?
Abstract (arXiv)
Over the past few years, we have witnessed remarkable advancements in Code Pre-trained Models (CodePTMs). These models achieved excellent representation capabilities by designing structure-based pre-training tasks for code. However, how to enhance the absorption of structural knowledge when fine-tuning CodePTMs still remains a significant challenge. To fill this gap, in this paper, we present Structure-aware Fine-tuning (SAT), a novel structure-enhanced and plug-and-play fine-tuning method for CodePTMs. We first propose a structure loss to quantify the difference between the information learned by CodePTMs and the knowledge extracted from code structure. Specifically, we use the attention scores extracted from Transformer layer as the learned structural information, and the shortest path length between leaves in abstract syntax trees as the structural knowledge. Subsequently, multi-task learning is introduced to improve the performance of fine-tuning. Experiments conducted on four pre-trained models and two generation tasks demonstrate the effectiveness of our proposed method as a plug-and-play solution. Furthermore, we observed that SAT can benefit CodePTMs more with limited training data.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 26 of its 37 references that are in the map. First posted on arXiv 11 Apr 2024.
Builds on
26 of 37 references.
References · 26
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 670
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
14 more
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2021What do pre-trained code models know about code?cited by 36
- 2019From GAN to WGANcited by 34
- 2022Probing Pretrained Models of Source Codecited by 26
- 2021Direct Measure Matching for Crowd Countingcited by 18
- 2022Y-Tuning: An Efficient Tuning Paradigm for Large-Scale Pre-Trained Models via Label Representation Learningcited by 15
- 2022A Survey on Pretrained Language Models for Neural Code Intelligencecited by 13
- 2023TransCoder: Towards Unified Transferable Code Representation Learning Inspired by Human Skillscited by 8
- 2022CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structurecited by 6
- 2022Parameter-Efficient Finetuning of Transformers for Source Codecited by 6
- 2022A Neural Network Architecture for Program Understanding Inspired by Human Behaviorscited by 5
- 2022Assessing Project-Level Fine-Tuning of ML4SE Modelscited by 2
Built on by
Citing papers per year: 2024: 1; 2025: 2.
3 papers.