LoRACode: LoRA Adapters for Code Embeddings
Not on the map. Why?
Abstract (arXiv)
Code embeddings are essential for semantic code search; however, current approaches often struggle to capture the precise syntactic and contextual nuances inherent in code. Open-source models such as CodeBERT and UniXcoder exhibit limitations in scalability and efficiency, while high-performing proprietary systems impose substantial computational costs. We introduce a parameter-efficient fine-tuning method based on Low-Rank Adaptation (LoRA) to construct task-specific adapters for code retrieval. Our approach reduces the number of trainable parameters to less than two percent of the base model, enabling rapid fine-tuning on extensive code corpora (2 million samples in 25 minutes on two H100 GPUs). Experiments demonstrate an increase of up to 9.1% in Mean Reciprocal Rank (MRR) for Code2Code search, and up to 86.69% for Text2Code search tasks across multiple programming languages. Distinction in task-wise and language-wise adaptation helps explore the sensitivity of code retrieval for syntactical and linguistic variations. To foster research in this area, we make our code and pre-trained models publicly available.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 26 references that are in the map. First posted on arXiv 7 Mar 2025.
Builds on
21 of 26 references.
References · 21
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2015FaceNet: A Unified Embedding for Face Recognition and Clusteringcited by 2,849
- 2020Supervised Contrastive Learningcited by 2,829
- 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
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
9 more
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 75
- 2024CoIR: A Comprehensive Benchmark for Code Information Retrieval Modelscited by 60
- 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 56
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 34
- 2023ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learningcited by 16
- 2023Survey of Code Search Based on Deep Learningcited by 6
- 2023Language Agnostic Code Embeddingscited by 4
- 2024Refining Joint Text and Source Code Embeddings for Retrieval Task with Parameter-Efficient Fine-Tuningcited by 1
- 2024Improving Text Embeddings for Smaller Language Models Using Contrastive Fine-tuningcited by 1
Built on by
Not cited yet.