On the Importance of Building High-quality Training Datasets for Neural Code Search
Not on the map. Why?
Abstract (arXiv)
The performance of neural code search is significantly influenced by the quality of the training data from which the neural models are derived. A large corpus of high-quality query and code pairs is demanded to establish a precise mapping from the natural language to the programming language. Due to the limited availability, most widely-used code search datasets are established with compromise, such as using code comments as a replacement of queries. Our empirical study on a famous code search dataset reveals that over one-third of its queries contain noises that make them deviate from natural user queries. Models trained through noisy data are faced with severe performance degradation when applied in real-world scenarios. To improve the dataset quality and make the queries of its samples semantically identical to real user queries is critical for the practical usability of neural code search. In this paper, we propose a data cleaning framework consisting of two subsequent filters: a rule-based syntactic filter and a model-based semantic filter. This is the first framework that applies semantic query cleaning to code search datasets. Experimentally, we evaluated the effectiveness of our framework on two widely-used code search models and three manually-annotated code retrieval benchmarks. Training the popular DeepCS model with the filtered dataset from our framework improves its performance by 19.2% MRR and 21.3% Answer@1, on average with the three validation benchmarks.
Key facts. Cited by 30 papers in the map (data through 7 Oct 2026). Builds on 19 of its 63 references that are in the map. First posted on arXiv 14 Feb 2022.
Builds on
19 of 63 references.
References · 19
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2013Auto-Encoding Variational Bayescited by 3,980
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2019Deep Learning for Anomaly Detection: A Surveycited by 357
- 2018Unsupervised Anomaly Detection via Variational Auto-Encoder for Seasonal KPIs in Web Applicationscited by 223
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
- 2019When Deep Learning Met Code Searchcited by 45
- 2019Multi-Modal Attention Network Learning for Semantic Source Code Retrievalcited by 40
- 2018StaQC: A Systematically Mined Question-Code Dataset from Stack Overflowcited by 30
- 2019CoaCor: Code Annotation for Code Retrieval with Reinforcement Learningcited by 22
- 2020Opportunities and Challenges in Code Search Toolscited by 22
7 more
- 2020A Multi-Perspective Architecture for Semantic Code Searchcited by 20
- 2018Distributed Anomaly Detection using Autoencoder Neural Networks in WSN for IoTcited by 16
- 2020Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learningcited by 16
- 2019Neural Code Search Evaluation Datasetcited by 13
- 2020TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Searchcited by 11
- 2020OCoR: An Overlapping-Aware Code Retrievercited by 9
- 2020PSCS: A Path-based Neural Model for Semantic Code Searchcited by 3
Built on by
Citing papers per year: 2022: 4; 2023: 6; 2024: 11; 2025: 4; 2026: 5.
30 papers.
Sort:
By area:
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2025Treble Counterfactual VLMs: A Causal Approach to Hallucinationcited by 33
- 2024AD-LLM: Benchmarking Large Language Models for Anomaly Detectioncited by 25
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2025Secure On-Device Video OOD Detection Without Backpropagationcited by 19
- 2024MetaOOD: Automatic Selection of OOD Detection Modelscited by 16
- 2022Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systemscited by 12
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
18 more
- 2026FORTIS: Benchmarking Over-Privilege in Agent Skillscited by 11
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inferencecited by 10
- 2026Defenses Against Prompt Attacks Learn Surface Heuristicscited by 10
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Surveycited by 9
- 2025Charts Are Not Images: On the Challenges of Scientific Chart Editingcited by 9
- 2024Model Editing for LLMs4Code: How Far are We?cited by 8
- 2026The Autonomy Tax: Defense Training Breaks LLM Agentscited by 8
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Taskscited by 6
- 2024Backpropagation-Free Multi-modal On-Device Model Adaptation via Cloud-Device Collaborationcited by 5
- 2022Towards Using Data-Influence Methods to Detect Noisy Samples in Source Code Corporacited by 4
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentationcited by 4
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistenciescited by 3
- 2023CompCodeVet: A Compiler-guided Validation and Enhancement Approach for Code Datasetcited by 3
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understandingcited by 2
- 2024VRMN-bD: A Multi-modal Natural Behavior Dataset of Immersive Human Fear Responses in VR Stand-up Interactive Gamescited by 1
- 2024Grounding is All You Need? Dual Temporal Grounding for Video Dialogcited by 1
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Codecited by 1
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Studycited by 0
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026FORTIS: Benchmarking Over-Privilege in Agent Skills9 May 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026The Autonomy Tax: Defense Training Breaks LLM Agents19 Mar 2026
- 2026Defenses Against Prompt Attacks Learn Surface Heuristics12 Jan 2026
- 2025Charts Are Not Images: On the Challenges of Scientific Chart Editing30 Nov 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
- 2025Treble Counterfactual VLMs: A Causal Approach to Hallucination8 Mar 2025
- 2025Secure On-Device Video OOD Detection Without Backpropagation8 Mar 2025
- 2024AD-LLM: Benchmarking Large Language Models for Anomaly Detection15 Dec 2024
- 2024Model Editing for LLMs4Code: How Far are We?11 Nov 2024
- 2024Grounding is All You Need? Dual Temporal Grounding for Video Dialog8 Oct 2024
18 more
- 2024MetaOOD: Automatic Selection of OOD Detection Models4 Oct 2024
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation30 Sep 2024
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024Backpropagation-Free Multi-modal On-Device Model Adaptation via Cloud-Device Collaboration21 May 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024GenCode: A Generic Data Augmentation Framework for Boosting Deep Learning-Based Code Understanding24 Feb 2024
- 2024VRMN-bD: A Multi-modal Natural Behavior Dataset of Immersive Human Fear Responses in VR Stand-up Interactive Games22 Jan 2024
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inference18 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023CompCodeVet: A Compiler-guided Validation and Enhancement Approach for Code Dataset11 Nov 2023
- 2023Pitfalls in Language Models for Code Intelligence: A Taxonomy and Survey27 Oct 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistencies10 Jun 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentation6 Oct 2022
- 2022Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems13 Sep 2022
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligence24 Jul 2022
- 2022Towards Using Data-Influence Methods to Detect Noisy Samples in Source Code Corpora25 May 2022
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2024AD-LLM: Benchmarking Large Language Models for Anomaly Detectioncited by 25
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2025Secure On-Device Video OOD Detection Without Backpropagationcited by 19
- 2024MetaOOD: Automatic Selection of OOD Detection Modelscited by 16
- 2022Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systemscited by 12
- 2024When Neural Code Completion Models Size up the Situation: Attaining Cheaper and Faster Completion through Dynamic Model Inferencecited by 10
- 2026Defenses Against Prompt Attacks Learn Surface Heuristicscited by 10
12 most cited of 25 All 25 (JSON)
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code6 May 2026
- 2026Defenses Against Prompt Attacks Learn Surface Heuristics12 Jan 2026
- 2025Charts Are Not Images: On the Challenges of Scientific Chart Editing30 Nov 2025
- 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Tasks28 Apr 2025
- 2025Secure On-Device Video OOD Detection Without Backpropagation8 Mar 2025
- 2024AD-LLM: Benchmarking Large Language Models for Anomaly Detection15 Dec 2024
- 2024Model Editing for LLMs4Code: How Far are We?11 Nov 2024
- 2024Grounding is All You Need? Dual Temporal Grounding for Video Dialog8 Oct 2024
- 2024MetaOOD: Automatic Selection of OOD Detection Models4 Oct 2024
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation30 Sep 2024
- 2024Backpropagation-Free Multi-modal On-Device Model Adaptation via Cloud-Device Collaboration21 May 2024
12 newest of 25 All 25 (JSON)