mlsanityData to 14 Oct 2026

SACL: Understanding and Combating Textual Bias in Code Retrieval with Semantic-Augmented Reranking and Localization

arXiv 2506.20081 ↗First posted 25 Jun 2025cs.CL cs.AIcited by 4

On the map: Retrieval-augmented generation → RAG for code

Abstract (arXiv)

Retrieval-Augmented Code Generation (RACG) is a critical technique for enhancing code generation by retrieving relevant information. In this work, we conduct an in-depth analysis of code retrieval by systematically masking specific features while preserving code functionality. Our discoveries include: (1) although trained on code, current retrievers heavily rely on surface-level textual features (e.g., docstrings, identifier names), and (2) they exhibit a strong bias towards well-documented code, even if the documentation is irrelevant. Based on our discoveries, we propose SACL, a framework that enriches textual information and reduces bias by augmenting code or structural knowledge with semantic information. Extensive experiments show that SACL substantially improves code retrieval (e.g., by 12.8% / 9.4% / 7.0% Recall@1 on HumanEval / MBPP / SWE-Bench-Lite), which also leads to better code generation performance (e.g., by 4.88% Pass@1 on HumanEval).

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 20 of its 24 references that are in the map. First posted on arXiv 25 Jun 2025.

Builds on

20 of 24 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?20 Jun
  2. 2023Retrieval-Augmented Code Generation for Universal Information Extraction6 Nov
  3. 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar
  4. 2021Retrieval Augmented Code Generation and Summarization26 Aug

Other references · 16

  1. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
  2. 2021Program Synthesis with Large Language Modelscited by 3,637
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2021BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Modelscited by 1,252
  6. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  7. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  8. 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
  9. 2024Agentless: Demystifying LLM-based Software Engineering Agentscited by 421
  10. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  11. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  12. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
4 more
  1. 2020Generation-Augmented Retrieval for Open-domain Question Answeringcited by 186
  2. 2024AgentFL: Scaling LLM-based Fault Localization to Project-Level Contextcited by 47
  3. 2023Neural Retrievers are Biased Towards LLM-Generated Contentcited by 38
  4. 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
  2. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  3. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  4. 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generation
  5. 2024Building A Coding Assistant via the Retrieval-Augmented Language Model
  6. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
  7. 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval
  8. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond